# Business Logic — KKW00127SFLogic.getInpuBundleData() [293 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00127SF.KKW00127SFLogic` |
| Layer | Service Logic (Web-tier business logic) |
| Module | `KKW00127SF` (Package: `eo.web.webview.KKW00127SF`) |

## 1. Role

### KKW00127SFLogic.getInpuBundleData()

This method retrieves and bundles input data for service contract update screens when the service type is **not solely a TV-type service**. It acts as a **data aggregation and routing method** within the KKW00127SF (Order Information Update Determination Class) module, which handles the "Order Information Update" screen flow for customer contract modifications in the K-Opticom telecom billing system.

The method handles **four service types** based on the `svc_cd` flag: `01` (FTTH/Net/Home types), `03` (TV Households), `04` (TV Concentrated Residences), and `05` (TV Rebroadcast/KCN). When the service code falls within any of these ranges, it enters a main processing bracket that branches into two sub-paths: a **non-TV administrative commission handling path** (for codes 01, 03, 04) that processes service fee commission codes and temporary payment amount settings, and a **TV bundle information path** (for codes 03, 04, 05) that extracts bundle package codes and display names. Additionally, it always retrieves standard work fee data regardless of the service type. The method uses a **dispatch pattern** — it routes data extraction and transformation to different branches based on service type, setting extracted values back onto the form bean for screen display. It is called exclusively from `getPulldownUpd()` when the movement distinction (`ido_div`) indicates a "bundle information correction" (`00040`) scenario.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getInpuBundleData(svcFormBean)"])

    START --> GET_SVKEI_INFO["GET: Get svkei_Info list and subbean"]
    GET_SVKEI_INFO --> GET_UPD_DTM["GET: Get upd_dtm from subbean"]
    GET_UPD_DTM --> SET_UPD_DTM["SET: Set SVKEI_UPD_DTM to svcFormBean"]
    SET_UPD_DTM --> GET_MSKM_DTL["GET: Get mskm_dtl_no from subbean"]
    GET_MSKM_DTL --> SET_MSKM_DTL["SET: Set MSKM_DTL_NO to svcFormBean"]
    SET_MSKM_DTL --> GET_SVKEI_TV_INFO["GET: Get svkeiTv_Info list and subbean"]
    GET_SVKEI_TV_INFO --> GET_SVKEI_UPD_DTM["GET: Get svkei_upd_dtm from TV subbean"]
    GET_SVKEI_UPD_DTM --> SET_SVKEI_TV_UPD_DTM["SET: Set SVKEI_TV_UPD_DTM to svcFormBean"]
    SET_SVKEI_TV_UPD_DTM --> CHECK_SVC{svc_cd != TV type?}

    CHECK_SVC -->|Yes| INSIDE_BRACKET["Enter main processing"]
    CHECK_SVC -->|No| END_METHOD["END: Return"]

    INSIDE_BRACKET --> CHECK_NON_TV{svc_cd == 01, 03, 04 (non-TV)?}

    CHECK_NON_TV -->|Yes| GET_JIMU_COMMISION["GET: Get jimu_icjkn_list"]
    CHECK_NON_TV -->|No| CHECK_TV_SERVICE{svc_cd == 03, 04, 05 (TV)?}

    GET_JIMU_COMMISION --> GET_JIMU_INDEX["GET: Get jimu_icjkn_index"]
    GET_JIMU_INDEX --> GET_JIMU_CD["GET: Get jimu_icjkn_cd by index"]
    GET_JIMU_CD --> SET_JIMU_CD["SET: Set JIMU_COMMISION_CD"]
    SET_JIMU_CD --> GET_ICHJKN_LIST["GET: Get icjkn_sette_list"]

    GET_ICHJKN_LIST --> CHECK_ICJKN{"icjkn_sette_list valid?"}

    CHECK_ICJKN -->|Yes| START_LOOP["FOR: i = 0 to count"]
    CHECK_ICJKN -->|No| NO_LIST_BRACKET["ELSE branch"]

    START_LOOP --> GET_SUBBEAN_I["GET: Get icjkn_sette_subbean"]
    GET_SUBBEAN_I --> GET_TMP_PAY["GET: Get tmpPayPrcNo"]
    GET_TMP_PAY --> SUBSTR_DIV["EXEC: divStr = substring(0, 2)"]

    SUBSTR_DIV --> CHECK_DIV0104{"divStr == 01/04/11/21?"}

    CHECK_DIV0104 -->|Yes| GET_TMP_PAY_9["GET: Get first 9 chars"]
    GET_TMP_PAY_9 --> CHECK_CONTRACT{"Matches KEI list?"}
    CHECK_CONTRACT -->|Yes| GET_JIMU_COMMITION["GET: Get jimu_commition_list"]
    CHECK_CONTRACT -->|No| CONTINUE_LOOP["Continue loop"]
    GET_JIMU_COMMITION --> CHECK_JIMU_COMM{"List valid?"}

    CHECK_JIMU_COMM -->|Yes| COMMISION_BRANCH["Switch on jimu_icjkn_cd"]
    CHECK_JIMU_COMM -->|No| CONTINUE_LOOP
    CONTINUE_LOOP --> NEXT_LOOP["i++"]
    NEXT_LOOP --> CHECK_DIV0104

    COMMISION_BRANCH -->|"01"| SET_AMNT_NULL["SET: amnt = 0, ''"]
    COMMISION_BRANCH -->|"02"| SET_AMNT_NULL2["SET: amnt = 0, ''"]
    COMMISION_BRANCH -->|"03"| SET_AMNT_NULL3["SET: amnt = 0, ''"]
    COMMISION_BRANCH -->|"04"| SET_AMNT_GET["GET: amnt, remove commas"]

    SET_AMNT_NULL --> SET_RT["SET: Set JIMU_ICJKN_SETTE_RT"]
    SET_AMNT_NULL2 --> SET_RT
    SET_AMNT_NULL3 --> SET_RT
    SET_AMNT_GET --> SET_RT

    SET_RT --> SET_ICJKN["SET: Set ICJKN_NO, TMP_PAY_PRC_NO, UPD_DTM"]
    SET_ICJKN --> NEXT_LOOP

    NO_LIST_BRACKET --> CHECK_DSP04{"jimu_icjkn_cd == 04?"}
    CHECK_DSP04 -->|Yes| GET_JIMU_AMNT["GET: Get amnt, remove commas, set to bean"]
    CHECK_DSP04 -->|No| CHECK_TV_SERVICE

    GET_JIMU_AMNT --> NEXT_LOOP

    CHECK_TV_SERVICE -->|Yes| GET_BUNDLE["GET: Get bundle_info list"]
    CHECK_TV_SERVICE -->|No| GET_STDARD_KOJI["GET: Get stdard_koji_hi_list"]

    GET_BUNDLE --> CHECK_BUNDLE{"bundle_index null or empty?"}
    CHECK_BUNDLE -->|Yes| SET_BUNDLE_IDX["SET: bundle_index = 0"]
    CHECK_BUNDLE -->|No| GET_BUNDLE_CD["GET: Get bundle_cd and name"]

    SET_BUNDLE_IDX --> GET_BUNDLE_CD
    GET_BUNDLE_CD --> SET_BUNDLE_INFO["SET: Set BUNDLE_INFO and DSP_BUNDLE_INFO"]
    SET_BUNDLE_INFO --> GET_STDARD_KOJI

    GET_STDARD_KOJI --> CHECK_STDARD{"stdard_koji list valid?"}

    CHECK_STDARD -->|Yes| GET_STDARD_IDX["GET: Get stdard_koji_hi_index and cd"]
    CHECK_STDARD -->|No| END_METHOD

    GET_STDARD_IDX --> SET_STDARD_CD["SET: Set STDARD_KOJI_HI_CD"]
    SET_STDARD_CD --> END_METHOD
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `svcFormBean` | `X31SDataBeanAccess` | The screen form bean that carries all input data for the Order Information Update screen. It contains nested data bean arrays for service info, TV service info, administrative commission lists, temporary payment setup lists, bundle info lists, and standard work fee lists. The method reads from this bean to extract values and writes computed/derived values back to it for screen display. |

**Instance fields read by this method:**

| Field Name | Type | Business Description |
|-----------|------|---------------------|
| `svc_cd` | `String` | Service code flag — determines which service type is being processed (01=FTTH/Net/Home, 03=TV Household, 04=TV Concentrated, 05=TV Rebroadcast/KCN). Controls all branching logic in this method. |

## 4. CRUD Operations / Called Services

This method performs **no direct database or entity operations**. It operates entirely on in-memory data bean structures (the form bean passed as a parameter). All called methods are data bean accessors or string utilities — they manipulate objects already loaded into memory, not database tables.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKAdEditCC.substring` | JKKAdEditCC | - | Calls `substring` in `JKKAdEditCC` |
| - | `JKKAdEdit.substring` | JKKAdEdit | - | Calls `substring` in `JKKAdEdit` |
| - | `JKKTelnoInfoAddMapperCC.substring` | JKKTelnoInfoAddMapperCC | - | Calls `substring` in `JKKTelnoInfoAddMapperCC` |
| R | `JEDK0011C080TPMA.getCount` | JEDK0011C080TPMA | - | Calls `getCount` in `JEDK0011C080TPMA` |
| - | `JDKejbStringEdit.substring` | JDKejbStringEdit | - | Calls `substring` in `JDKejbStringEdit` |
| R | `OneStopDataBeanAccessArray.getCount` | OneStopDataBeanAccessArray | - | Calls `getCount` in `OneStopDataBeanAccessArray` |
| R | `OneStopDataBeanAccessArray.getDataBean` | OneStopDataBeanAccessArray | - | Calls `getDataBean` in `OneStopDataBeanAccessArray` |
| R | `OneStopDataBeanAccess.getDataBeanArray` | OneStopDataBeanAccess | - | Calls `getDataBeanArray` in `OneStopDataBeanAccess` |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Calls `sendMessageString` in `OneStopDataBeanAccess` |
| R | `SCW00101SFLogic.getCount` | SCW00101SFLogic | - | Calls `getCount` in `SCW00101SFLogic` |
| R | `FUW09905SFLogic.getDataBean` | FUW09905SFLogic | - | Calls `getDataBean` in `FUW09905SFLogic` |
| R | `FUSV0277_FUSV0277OPDBMapper.getDataBean` | FUSV0277_FUSV0277OPDBMapper | - | Calls `getDataBean` in `FUSV0277_FUSV0277OPDBMapper` |
| R | `FUW00162SFLogic.getDataBean` | FUW00162SFLogic | - | Calls `getDataBean` in `FUW00162SFLogic` |

**CRUD Classification Rationale:**
- All data bean array `getDataBeanArray()` calls are **Read (R)** operations — they retrieve data that was previously loaded into the form bean (typically by a prior CBS call).
- All `getCount()` calls on bean arrays are **Read (R)** — checking the number of items in an in-memory collection.
- All `sendMessageString()` calls are **Execution (-)** — they are value extraction/setting operations on the data bean interface, not database operations.
- All `substring()` calls on helper classes are **Execution (-)** — string manipulation utilities.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS:KKW00127SFLogic.getPulldownUpd | `KKW00127SFLogic.getPulldownUpd` -> `getInpuBundleData` | `sendMessageString [-]`, `getDataBean [R]`, `getDataBeanArray [R]`, `getCount [R]` |

**Details:** The sole caller is `getPulldownUpd()` within the same class `KKW00127SFLogic`. This method is invoked when `ido_div` equals `00040` (Bundle Information Correction — バンドル情報訂正). The `ido_div` field is an instance field of `KKW00127SFLogic` set during screen initialization. There are no external screen entry points (KKSV*) or batch entry points that directly call this method — it is exclusively a CBS helper method routed through `getPulldownUpd()`.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET/GET] `(Initial data extraction for non-TV service)` (L1467)

This block extracts the base service information from the form bean, regardless of service type. It retrieves the service contract update datetime and registration detail number from the main service info bean, plus the TV-specific update datetime.

| # | Type | Code |
|---|------|------|
| 1 | GET | `svkei_Info = svcFormBean.getDataBeanArray(KKW00127SFConst.EKK0081A010CBSMSG1LIST)` // Retrieve service info array |
| 2 | GET | `svkei_subbean = svkei_Info.getDataBean(0)` // Get first service info bean |
| 3 | GET | `upd_dtm = svkei_subbean.sendMessageString(KKW00127SFConst.UPD_DTM_02, X31CWebConst.DATABEAN_GET_VALUE)` // Get update datetime (L1470) |
| 4 | SET | `svcFormBean.sendMessageString(KKW00127SFConst.SVKEI_UPD_DTM, X31CWebConst.DATABEAN_SET_VALUE, upd_dtm)` // Set update datetime [-> SVKEI_UPD_DTM] (L1471) |
| 5 | GET | `mskm_dtl_no = svkei_subbean.sendMessageString(KKW00127SFConst.MSKM_DTL_NO_02, X31CWebConst.DATABEAN_GET_VALUE)` // Get registration detail number (L1474) |
| 6 | SET | `svcFormBean.sendMessageString(KKW00127SFConst.MSKM_DTL_NO, X31CWebConst.DATABEAN_SET_VALUE, mskm_dtl_no)` // Set registration detail number [-> MSKM_DTL_NO] (L1475) |
| 7 | GET | `svkeiTv_Info = svcFormBean.getDataBeanArray(KKW00127SFConst.EKK0101A010CBSMSG1LIST)` // Get TV service info array (L1477) |
| 8 | GET | `svkeiTv_subbean = svkeiTv_Info.getDataBean(0)` // Get first TV service bean (L1478) |
| 9 | GET | `svkei_upd_dtm = svkeiTv_subbean.sendMessageString(KKW00127SFConst.UPD_DTM_06, X31CWebConst.DATABEAN_GET_VALUE)` // Get update datetime (TV) [-> UPD_DTM_06] (L1481) |
| 10 | SET | `svcFormBean.sendMessageString(KKW00127SFConst.SVKEI_TV_UPD_DTM, X31CWebConst.DATABEAN_SET_VALUE, svkei_upd_dtm)` // Set TV update datetime [-> SVKEI_TV_UPD_DTM] (L1482) |

**Block 2** — [IF] `(svc_cd is a non-TV type: 01, 03, 04, or 05)` [SVC_FLG_01="01", SVC_FLG_03="03", SVC_FLG_05="05", SVC_FLG_04="04"] (L1484)

This is the main processing bracket. If `svc_cd` matches any of the four service flags (01=FTTH/Net/Home, 03=TV Household, 04=TV Concentrated, 05=TV Rebroadcast/KCN), the method enters the main processing block. Otherwise, the method returns immediately with no further action. The comment references "eo Television (Rebroadcast)" added per IT1-2012-0001521.

| # | Type | Code |
|---|------|------|
| 1 | IF | `svc_cd.equals(KKW00127SFConst.SVC_FLG_01)` // == "01" (FTTH/Net/Home type) |
| 2 | IF | `\|\| svc_cd.equals(KKW00127SFConst.SVC_FLG_03)` // == "03" (TV Household) |
| 3 | IF | `\|\| svc_cd.equals(KKW00127SFConst.SVC_FLG_05)` // == "05" (TV Rebroadcast/KCN) [IT1-2012-0001521 ADD: eo Television (Rebroadcast)] |
| 4 | IF | `\|\| svc_cd.equals(KKW00127SFConst.SVC_FLG_04)` // == "04" (TV Concentrated Residence) |

**Block 2.1** — [IF] `(svc_cd is non-TV: 01, 03, or 04)` [SVC_FLG_01="01", SVC_FLG_03="03", SVC_FLG_04="04"] (L1491)

This inner branch handles the non-TV service types (01, 03, 04). It processes administrative commission data including commission codes, temporary payment setup, and payment amount calculations. The comment references "Business error on bundle info change during order information update screen" [IT2-2013-0000519].

| # | Type | Code |
|---|------|------|
| 1 | IF | `svc_cd.equals(KKW00127SFConst.SVC_FLG_01)` // == "01" (FTTH/Net/Home) |
| 2 | IF | `\|\| svc_cd.equals(KKW00127SFConst.SVC_FLG_03)` // == "03" (TV Household) |
| 3 | IF | `\|\| svc_cd.equals(KKW00127SFConst.SVC_FLG_04)` // == "04" (TV Concentrated) |

**Block 2.1.1** — [SET/GET] `(Set listbox configuration for administrative commission)` (L1495)

Retrieves the administrative commission listbox and extracts the commission code. This prepares the commission division code for downstream processing.

| # | Type | Code |
|---|------|------|
| 1 | GET | `jimu_icjkn_list = svcFormBean.getDataBeanArray(KKW00127SFConst.JIMU_COMMISION_LIST)` // Get administrative commission list [-> JIMU_COMMISION_LIST] |
| 2 | GET | `jimu_icjkn_subbean = jimu_icjkn_list.getDataBean(0)` // Get first commission bean |
| 3 | GET | `jimu_icjkn_index = jimu_icjkn_subbean.sendMessageString(KKW00127SFConst.INDEX_01, X31CWebConst.DATABEAN_GET_VALUE)` // Get listbox index [-> INDEX_01] (L1498) |
| 4 | GET | `jimu_icjkn_cd = jimu_icjkn_subbean.sendMessageString(KKW00127SFConst.CD_DIV_LIST_01, X31CWebConst.DATABEAN_GET_VALUE, Integer.parseInt(jimu_icjkn_index))` // Get commission code by index [-> CD_DIV_LIST_01] (L1499-1500) |
| 5 | SET | `svcFormBean.sendMessageString(KKW00127SFConst.JIMU_COMMISION_CD, X31CWebConst.DATABEAN_SET_VALUE, jimu_icjkn_cd)` // Set commission code [-> JIMU_COMMISION_CD] (L1501) |

**Block 2.1.2** — [GET] `(Get temporary payment setup list)` (L1504)

Retrieves the temporary payment setup list for the administrative commission. This list contains rows of temporary payment amount and method configurations.

| # | Type | Code |
|---|------|------|
| 1 | GET | `icjkn_sette_list = svcFormBean.getDataBeanArray(KKW00127SFConst.EKK1021B501CBSMSG1LIST)` // Get temporary payment setup list [-> EKK1021B501CBSMSG1LIST] |

**Block 2.1.3** — [IF] `(icjkn_sette_list is not null AND count > 0)` (L1506)

Checks if the temporary payment setup list has data before iterating.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null != icjkn_sette_list && icjkn_sette_list.getCount() > 0` // List must exist and contain rows |

**Block 2.1.3.1** — [FOR] `(Iterate over temporary payment setup rows)` (L1508)

Iterates through each row of the temporary payment setup list to process payment amounts. This is a key business logic block that determines whether a row corresponds to a "contract service fee" (契約業務手数料) and routes processing accordingly.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for(int i = 0; i < icjkn_sette_list.getCount(); i++)` (L1508) |

**Block 2.1.3.1.1** — [GET/EXEC] `(Extract and parse payment number prefix)` (L1509)

Within each loop iteration, extracts the temporary payment amount number and takes the first 2 characters as a division string. The division string determines the payment category.

| # | Type | Code |
|---|------|------|
| 1 | GET | `icjkn_sette_subbean = icjkn_sette_list.getDataBean(i)` // Get bean at index i |
| 2 | GET | `tmpPayPrcNo = icjkn_sette_subbean.sendMessageString(KKW00127SFConst.TMP_PAY_PRC_NO_16, X31CWebConst.DATABEAN_GET_VALUE)` // Get payment number [-> TMP_PAY_PRC_NO_16] (L1510) |
| 3 | EXEC | `divStr = tmpPayPrcNo.substring(0, 2)` // Take first 2 chars as division code |

**Block 2.1.3.1.2** — [IF] `(divStr matches contract service fee patterns: 01, 04, 11, or 21)` [ANK-3636-00-00 ADDITION] (L1514)

Checks if the payment number prefix matches known contract service fee types. This was expanded from just "01"/"04" to also include "11" and "21" per ANK-3636-00-00 (Consumption Tax 8%->10%対応, 2014/03/03). The prefix "01" means standard, "04" means surcharge, "11" means 8% tax, "21" means 10% tax.

| # | Type | Code |
|---|------|------|
| 1 | IF | `divStr.equals("01")` // Standard (従) |
| 2 | IF | `\|\| divStr.equals("04")` // Surcharge (付) |
| 3 | IF | `\|\| divStr.equals("11")` // 8% tax [ANK-3636-00-00 MOD] |
| 4 | IF | `\|\| divStr.equals("21")` // 10% tax [ANK-3636-00-00 MOD] |

**Block 2.1.3.1.2.1** — [SET/IF/GET] `(Check if contract service fee and process commission)` (L1522)

When the prefix matches, extracts the first 9 characters of the payment number and checks against the `KEI_EXPENSE_CHARGE_BEFORE9` constant array (the "contract service fee before 9 chars"). If the 9-char prefix matches one of the known contract service fee patterns (e.g., "010050486"), it further processes the commission amount. If it does NOT match, the loop continues to the next row — effectively skipping non-contract-service-fee rows even if their prefix matched.

| # | Type | Code |
|---|------|------|
| 1 | GET | `wkTmpPayPrvNoBefore9 = tmpPayPrcNo.substring(0, 9)` // First 9 chars [-> 9 chars] (L1525) |
| 2 | SET | `isKeiExpenseCharge = false` // Initialize flag |
| 3 | FOR | `for(int cnt = 0; cnt < KEI_EXPENSE_CHARGE_BEFORE9.length; cnt++)` // Check against contract service fee array (L1528) |
| 4 | IF | `KEI_EXPENSE_CHARGE_BEFORE9[cnt].equals(wkTmpPayPrvNoBefore9)` // [-> KEI_EXPENSE_CHARGE_BEFORE9 = {"010050486", "010050016", "010050506", "010450066", "110050486", "110050016", "110050506", "110450066", "210050486", "210050016", "210050506", "210450066"}] (L1530) |
| 5 | SET | `isKeiExpenseCharge = true; break` // Mark as contract service fee (L1532-1533) |
| 6 | IF | `!isKeiExpenseCharge` // Not a contract service fee (L1537) |
| 7 | EXEC | `continue` // Skip this row (L1539) |

**Block 2.1.3.1.2.1.1** — [GET/IF/SWITCH] `(Process commission amount based on jimu_icjkn_cd)` (L1543)

When the row IS a contract service fee AND the jimu_commition_list is valid, this block determines the commission amount based on the administrative commission code. It handles four cases: 01 (None), 02 (Applicable), 03 (Half Price), and 04 (Specified Amount). For codes 01-03, the commission amount is set to 0 with an empty string. For code 04 (指定額), the specified amount is extracted and comma separators are removed.

| # | Type | Code |
|---|------|------|
| 1 | GET | `jimu_commition_list = svcFormBean.getDataBeanArray(KKW00127SFConst.XXXXXXXXXXX2CBSMSG1LIST)` // Get commission amount list (L1543) |
| 2 | IF | `null != jimu_commition_list && 0 < jimu_commition_list.getCount()` // List is valid (L1544) |
| 3 | GET | `jimu_commition_subbean = jimu_commition_list.getDataBean(0)` // Get first commission bean |
| 4 | SET | `jimu_icjkn_sette_rt = null` // Initialize payment rate |
| 5 | SET | `jimu_commision_amnt = ""` // Initialize amount (empty string, not null) [IT1-2012-0001792 MOD] (L1553-1554) |
| 6 | IF | `jimu_icjkn_cd.equals(DSP_JIMU_COMMISION_CD_01 == "01")` // None (無) (L1556) |
| 7 | SET | `jimu_commition_subbean.sendMessageString(JIMU_COMMISION_AMNT_LIST_07, DATABEAN_SET_VALUE, 0, "")` // Set amount to 0, empty (L1557-1561) |
| 8 | ELSE IF | `jimu_icjkn_cd.equals(DSP_JIMU_COMMISION_CD_02 == "02")` // Applicable (有) (L1564) |
| 9 | SET | `jimu_commition_subbean.sendMessageString(JIMU_COMMISION_AMNT_LIST_07, DATABEAN_SET_VALUE, 0, "")` // Set amount to 0, empty (L1565-1569) |
| 10 | ELSE IF | `jimu_icjkn_cd.equals(DSP_JIMU_COMMISION_CD_03 == "03")` // Half Price (半額) (L1572) |
| 11 | SET | `jimu_commition_subbean.sendMessageString(JIMU_COMMISION_AMNT_LIST_07, DATABEAN_SET_VALUE, 0, "")` // Set amount to 0, empty (L1573-1577) |
| 12 | ELSE IF | `jimu_icjkn_cd.equals(DSP_JIMU_COMMISION_CD_04 == "04")` // Specified Amount (指定額) (L1580) |
| 13 | GET | `jimu_commision_amnt = jimu_commition_subbean.sendMessageString(JIMU_COMMISION_AMNT_LIST_07, DATABEAN_GET_VALUE, 0)` // Get specified amount (L1583) |
| 14 | EXEC | `jimu_commision_amnt = jimu_commision_amnt.replace(",", "")` // Remove commas for display (L1586) |
| 15 | SET | `svcFormBean.sendMessageString(JIMU_ICJKN_SETTE_RT, DATABEAN_SET_VALUE, jimu_icjkn_sette_rt)` // Set payment rate (null) [-> JIMU_ICJKN_SETTE_RT] (L1590) |
| 16 | SET | `svcFormBean.sendMessageString(JIMU_COMMISION_AMNT, DATABEAN_SET_VALUE, jimu_commision_amnt)` // Set commission amount [-> JIMU_COMMISION_AMNT] (L1593) |

**Block 2.1.3.1.2.1.1.1** — [SET] `(Set ICJKN fields if subbean exists)` (L1595)

Within the commission processing block, if the payment setup subbean is not null, sets three fields: ICJKN_SETTE_NO (temporary payment setup number), TMP_PAY_PRC_NO (temporary payment amount number), and UPD_DTM_07 (update datetime before update).

| # | Type | Code |
|---|------|------|
| 1 | IF | `icjkn_sette_subbean != null` (L1595) |
| 2 | SET | `svcFormBean.sendMessageString(JIMU_ICJKN_SETTE_NO, DATABEAN_SET_VALUE, icjkn_sette_subbean.sendMessageString(ICJKN_SETTE_NO_16, DATABEAN_GET_VALUE))` // Set setup number [-> ICJKN_SETTE_NO_16] (L1597-1601) |
| 3 | SET | `svcFormBean.sendMessageString(JIMU_TMP_PAY_PRC_NO, DATABEAN_SET_VALUE, icjkn_sette_subbean.sendMessageString(TMP_PAY_PRC_NO_16, DATABEAN_GET_VALUE))` // Set payment amount number [-> TMP_PAY_PRC_NO_16] (L1604-1607) |
| 4 | SET | `svcFormBean.sendMessageString(UPD_DTM_07, DATABEAN_SET_VALUE, icjkn_sette_subbean.sendMessageString(UPD_DTM_16, DATABEAN_GET_VALUE))` // Set update datetime [-> UPD_DTM_16] (L1610-1613) |

**Block 2.1.3.1.3** — [ELSE] `(divStr is "02" or "99" — Standard Work Fee)` (L1628)

Handles the case where the payment number prefix is "02" or "99". The comment explains: "Since '02' was recorded, append standard work fee '99'" [IT1-2012-0002333]. When standard work fee is "Applicable" (有), there is no record in the temporary payment setup, so the input value cannot be retrieved here — the code below is commented out and processing moves to the common section.

For non-contract-service-fee rows (else branch of Block 2.1.3.1.2), if the `jimu_icjkn_cd` is "04" (Specified Amount), it retrieves the commission amount, removes commas, and sets it to the form bean.

| # | Type | Code |
|---|------|------|
| 1 | IF | `divStr.equals("02") || divStr.equals("99")` // Standard work fee prefix (L1628) |
| 2 | COMMENT | "// Standard work fee — no temp payment record, move to common section (L1632-1644)" |
| 3 | IF | `icjkn_sette_subbean != null` (L1647) |
| 4 | SET | `svcFormBean.sendMessageString(STDARD_ICJKN_SETTE_NO, DATABEAN_SET_VALUE, icjkn_sette_subbean.sendMessageString(ICJKN_SETTE_NO_08, DATABEAN_GET_VALUE))` // Set setup number [-> ICJKN_SETTE_NO_08] (L1648-1650) |
| 5 | SET | `svcFormBean.sendMessageString(STDARD_TMP_PAY_PRC_NO, DATABEAN_SET_VALUE, icjkn_sette_subbean.sendMessageString(TMP_PAY_PRC_NO_08, DATABEAN_GET_VALUE))` // Set payment number [-> TMP_PAY_PRC_NO_08] (L1653-1655) |
| 6 | SET | `svcFormBean.sendMessageString(UPD_DTM_08, DATABEAN_SET_VALUE, icjkn_sette_subbean.sendMessageString(UPD_DTM_16, DATABEAN_GET_VALUE))` // Set update datetime [-> UPD_DTM_16] (L1658-1660) |
| 7 | SET | `stdard_koji_icjkn_shitei_rt = null` // Initialize payment rate (L1664) |
| 8 | SET | `svcFormBean.sendMessageString(STDARD_KOJI_ICJKN_SHITEI_RT, DATABEAN_SET_VALUE, stdard_koji_icjkn_shitei_rt)` // Set payment rate (null) [-> STDARD_KOJI_ICJKN_SHITEI_RT] (L1678) |

**Block 2.1.3.2** — [ELSE] `(icjkn_sette_list is empty or null)` (L1683)

When the temporary payment setup list is empty or null, a simplified check is performed. If `jimu_icjkn_cd` is "04" (Specified Amount), the commission amount is retrieved from the jimu_commition_list, commas are removed, and set to svcFormBean.

| # | Type | Code |
|---|------|------|
| 1 | IF | `jimu_icjkn_cd.equals(DSP_JIMU_COMMISION_CD_04 == "04")` // Specified Amount (L1685) |
| 2 | GET | `jimu_commition_list = svcFormBean.getDataBeanArray(KKW00127SFConst.XXXXXXXXXXX2CBSMSG1LIST)` // Get commission list (L1686-1687) |
| 3 | IF | `null != jimu_commition_list && 0 < jimu_commition_list.getCount()` (L1688) |
| 4 | GET | `jimu_commition_subbean = jimu_commition_list.getDataBean(0)` // Get first commission bean |
| 5 | SET | `jimu_commision_amnt = ""` // Initialize (L1690) |
| 6 | GET | `jimu_commision_amnt = jimu_commition_subbean.sendMessageString(JIMU_COMMISION_AMNT_LIST_07, DATABEAN_GET_VALUE, 0)` // Get amount (L1693-1694) |
| 7 | EXEC | `jimu_commision_amnt = jimu_commision_amnt.replace(",", "")` // Remove commas (L1697) |
| 8 | SET | `svcFormBean.sendMessageString(JIMU_COMMISION_AMNT, DATABEAN_SET_VALUE, jimu_commision_amnt)` // Set amount [-> JIMU_COMMISION_AMNT] (L1699-1700) |

**Block 2.2** — [IF] `(svc_cd is TV service: 03, 04, or 05)` [SVC_FLG_03="03", SVC_FLG_04="04", SVC_FLG_05="05"] (L1706)

This branch handles TV-type services (03=TV Household, 04=TV Concentrated, 05=TV Rebroadcast/KCN). It extracts the bundle information — the bundle package code and its display name from the bundle info listbox. The bundle_index is defaulted to "0" if null or empty. The bundle_cd and bundle_info_nm are extracted using the index and set to the form bean for screen display.

| # | Type | Code |
|---|------|------|
| 1 | IF | `svc_cd.equals(KKW00127SFConst.SVC_FLG_03)` // == "03" (TV Household) |
| 2 | IF | `\|\| svc_cd.equals(KKW00127SFConst.SVC_FLG_04)` // == "04" (TV Concentrated) |
| 3 | IF | `\|\| svc_cd.equals(KKW00127SFConst.SVC_FLG_05)` // == "05" (TV Rebroadcast/KCN) |
| 4 | GET | `svkei_TV_list = svcFormBean.getDataBeanArray(KKW00127SFConst.BUNDLE_INFO_LSIT)` // Get bundle info list [-> BUNDLE_INFO_LSIT] |
| 5 | GET | `svkei_TV_subbean = svkei_TV_list.getDataBean(0)` // Get first bundle bean |
| 6 | GET | `bundle_index = svkei_TV_subbean.sendMessageString(KKW00127SFConst.INDEX_01, X31CWebConst.DATABEAN_GET_VALUE)` // Get bundle index [-> INDEX_01] (L1713) |
| 7 | IF | `bundle_index == null || bundle_index.length() == 0` // IT2-2012-0000555 |
| 8 | SET | `bundle_index = "0"` // Default to first item (L1715) |
| 9 | GET | `bundle_cd = svkei_TV_subbean.sendMessageString(KKW00127SFConst.CD_DIV_LIST_01, X31CWebConst.DATABEAN_GET_VALUE, Integer.parseInt(bundle_index))` // Get bundle code [-> CD_DIV_LIST_01] (L1717-1718) |
| 10 | SET | `svcFormBean.sendMessageString(KKW00127SFConst.BUNDLE_INFO, DATABEAN_SET_VALUE, bundle_cd)` // Set bundle code [-> BUNDLE_INFO] (L1719) |
| 11 | GET | `bundle_info_nm = svkei_TV_subbean.sendMessageString(KKW00127SFConst.CD_DIV_NM_LIST_01, X31CWebConst.DATABEAN_GET_VALUE, Integer.parseInt(bundle_index))` // Get bundle name [-> CD_DIV_NM_LIST_01] (L1721-1722) |
| 12 | SET | `svcFormBean.sendMessageString(KKW00127SFConst.DSP_BUNDLE_INFO, DATABEAN_SET_VALUE, bundle_info_nm)` // Set display name [-> DSP_BUNDLE_INFO] (L1726) |

**Block 2.3** — [GET] `(Retrieve standard work fee list — common to all types)` [IT2-2013-0000519] (L1730)

After all service-type-specific processing, this block retrieves the standard work fee list and extracts the standard work fee code. This is executed for ALL service types (not just TV), as it is inside the main bracket but outside the TV-specific branch. The comment references "Business error on bundle info change during order information update screen" [IT2-2013-0000519].

| # | Type | Code |
|---|------|------|
| 1 | GET | `stdard_koji_hi_list = svcFormBean.getDataBeanArray(KKW00127SFConst.STDARD_KOJI_HI_LSIT)` // Get standard work fee list [-> STDARD_KOJI_HI_LSIT] |
| 2 | IF | `null != stdard_koji_hi_list && 0 < stdard_koji_hi_list.getCount()` (L1731) |
| 3 | GET | `stdard_koji_hi_subbean = stdard_koji_hi_list.getDataBean(0)` // Get first standard work fee bean |
| 4 | GET | `stdard_koji_hi_index = stdard_koji_hi_subbean.sendMessageString(KKW00127SFConst.INDEX_01, X31CWebConst.DATABEAN_GET_VALUE)` // Get index [-> INDEX_01] (L1733) |
| 5 | GET | `stdard_koji_hi_cd = stdard_koji_hi_subbean.sendMessageString(KKW00127SFConst.CD_DIV_LIST_01, X31CWebConst.DATABEAN_GET_VALUE, Integer.parseInt(stdard_koji_hi_index))` // Get code by index [-> CD_DIV_LIST_01] (L1734-1735) |
| 6 | SET | `svcFormBean.sendMessageString(KKW00127SFConst.STDARD_KOJI_HI_CD, DATABEAN_SET_VALUE, stdard_koji_hi_cd)` // Set standard work fee code [-> STDARD_KOJI_HI_CD] (L1736) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_cd` | Field | Service code — classifies the service type (01=FTTH/Net/Home, 02=Net/Man, 03=TV Household, 04=TV Concentrated, 05=TV Rebroadcast/KCN, 06=Mobile, 07=ADSL, 99=Target excluded) |
| `ido_div` | Field | Movement distinction code — indicates the type of data correction being performed (00032=Registration info correction or Order info correction, 00034=Order info correction, 00040=Bundle info correction) |
| `svkei` | Field | Service contract (サービス契約) — internal abbreviation for service agreement data |
| `svkei_upd_dtm` | Field | Service contract update datetime — timestamp of the last update to the service contract record |
| `svkei_tv_upd_dtm` | Field | TV service contract update datetime — timestamp specific to the TV-type service record |
| `mskm_dtl_no` | Field | Registration detail number (明細番号) — unique identifier for a service contract detail line item |
| `jimu_icjkn_cd` | Field | Administrative commission code (事務委託コード) — classifies the type of commission (01=None, 02=Applicable, 03=Half Price, 04=Specified Amount) |
| `jimu_icjkn_sette_rt` | Field | Temporary payment designation rate (一時金指定率) — percentage rate for temporary payment amount (not set in this method, always null) |
| `jimu_commision_amnt` | Field | Administrative commission amount (事務委託金額) — the computed or specified commission amount in yen |
| `icjkn_sette_no` | Field | Temporary payment setup number (一時金設定番号) — identifier for a temporary payment setup record |
| `tmp_pay_prc_no` | Field | Temporary payment amount number (一時支払金額番号) — number identifying a temporary payment amount record; first 2 chars indicate the payment category |
| `KEI_EXPENSE_CHARGE_BEFORE9` | Constant | Contract service fee first-9-prefixes array — defines which 9-char prefixes identify contract service fee payment numbers (e.g., "010050486" for standard, "110050486" for 8% tax, "210050486" for 10% tax) |
| `bundle_cd` | Field | Bundle package code (バンドルコード) — code identifying a TV bundle package (e.g., a combined TV+Internet package) |
| `bundle_info_nm` | Field | Bundle information name (バンドル情報名称) — human-readable name of the TV bundle package |
| `stdard_koji_hi_cd` | Field | Standard work fee code (標準工事費コード) — classifies whether standard work fees are applicable (0=None, 1=Applicable) |
| `SVC_FLG_01` | Constant | Service flag "01" — FTTH/Net/Home type (eo光ネットワークタイプ、eo光ネットメゾantaiタイプ、光電話（ホームタイプ）) |
| `SVC_FLG_03` | Constant | Service flag "03" — TV Household type (eo光テレビ（戸建）) |
| `SVC_FLG_04` | Constant | Service flag "04" — TV Concentrated Residence type (eo光テレビ（集合住宅）) |
| `SVC_FLG_05` | Constant | Service flag "05" — TV Rebroadcast/KCN type (eo光テレビ（再送信）、eo光テレビ（KCN）) |
| DSP_JIMU_COMMISION_CD_01 | Constant | Display commission code "01" — None (無) |
| DSP_JIMU_COMMISION_CD_02 | Constant | Display commission code "02" — Applicable (有) |
| DSP_JIMU_COMMISION_CD_03 | Constant | Display commission code "03" — Half Price (半額) |
| DSP_JIMU_COMMISION_CD_04 | Constant | Display commission code "04" — Specified Amount (指定額) |
| DSP_STDARD_KOJI_HI_CD_01 | Constant | Display standard work fee code "0" — None (無) |
| DSP_STDARD_KOJI_HI_CD_02 | Constant | Display standard work fee code "1" — Applicable (有) |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| eo光 (eo Hikari) | Business term | NTT West's fiber-optic broadband service brand — the primary internet service product |
| eo光テレビ (eo Hikari TV) | Business term | NTT West's fiber-optic TV broadcasting service — bundled with eo Hikari internet |
| バンドル (Bundle) | Business term | Combined service package — e.g., internet + TV bundled together as a single offering |
| 一時金 (Ichijikin) | Business term | Temporary payment / one-time payment — settlement adjustment payment in telecom billing |
| 契約業務手数料 (Keiei Mushi Teateshu) | Business term | Contract service fee — administrative fees charged for processing service contracts |
| 標準工事費 (Hijun Kouji Hi) | Business term | Standard work fee — fixed installation/work charges for service setup |
| 事務委託 (Jimu Ikyou) | Business term | Administrative commission — fees for administrative services related to contract processing |
| 訂正 (Teisei) | Business term | Correction — the act of correcting/amending order information on the update screen |
| X31SDataBeanAccess | Technical | Data bean access interface — the standard form bean interface carrying screen data in the K-Opticom web framework |
| X31SDataBeanAccessArray | Technical | Data bean array — an array-style collection of X31SDataBeanAccess objects for listbox/table data |
