Stage 2 summary at 50 accepted trajectories

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 18:02:52 +02:00
parent 332fb4601d
commit 5bcd1bf9cd
1230 changed files with 77563 additions and 33 deletions

View File

@@ -0,0 +1,43 @@
FUNCTION {{p}}kennel_fee
IMPORTING
iv_pet_type TYPE string
iv_nights TYPE i
iv_peak TYPE abap_bool
EXPORTING
ev_deposit TYPE decfloat34
CHANGING
cv_fee TYPE decfloat34
EXCEPTIONS
invalid_nights.
DATA lv_rate TYPE decfloat34.
ev_deposit = 0.
cv_fee = 0.
IF iv_nights < 1.
RAISE invalid_nights.
ENDIF.
CASE iv_pet_type.
WHEN 'DOG'.
lv_rate = '24.90'.
WHEN 'CAT'.
lv_rate = '17.90'.
WHEN 'RABBIT'.
lv_rate = '11.90'.
WHEN OTHERS.
RETURN.
ENDCASE.
cv_fee = lv_rate * iv_nights.
IF iv_peak = abap_true.
cv_fee = cv_fee * '1.2'.
ENDIF.
IF iv_nights >= 7.
cv_fee = cv_fee * '0.9'.
ENDIF.
cv_fee = round( val = cv_fee dec = 2 mode = cl_abap_math=>round_half_up ).
ev_deposit = round( val = cv_fee * '0.2' dec = 2 mode = cl_abap_math=>round_half_up ).
ENDFUNCTION.