Commit d50a4dd
fix(finance): widen rm_cost flag_*_used constraints for V2 cascade labels + pass period to Oracle sync procedure
chk_rm_cost_flag_valuation_used/chk_rm_cost_flag_marketing_used still
only allowed V1 stage labels (CONS/STORES/DEPT/PO_1/PO_2/PO_3/INIT),
but buildOrApplyCost (V2 calc engine) has written V2 cascade-resolved
labels (CR/SR/PR/CL/SL/FL, SP/PP/FP) into those columns since
ENG-RM-01/P3. Any head whose cascade resolved to a V2-only label
violated the CHECK, failing RM_COST_CALC jobs chained after oracle-sync
(e.g. head 202006002 on flag_marketing_used). Widen both constraints
to accept the V2 labels alongside the legacy V1 ones.
Also wire the Oracle procedure's newly added p_period parameter
(PRC_CST_CONSSTKPO_MGT now accepts p_period IN VARCHAR2 DEFAULT NULL
'YYYYMM') through executeProcedure via the existing but previously
unused ExecuteProcedureWithParam, so the Oracle-side refresh always
targets the same period the Go job already resolved instead of
relying on the procedure's own SYSDATE-based auto-period fallback.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 2c7e23a commit d50a4dd
3 files changed
Lines changed: 63 additions & 2 deletions
File tree
- services/finance
- internal/application/oraclesync
- migrations/postgres
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
0 commit comments