ADT fallback: Accept headers for FUNC; G0189 accepted; regen2 results
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
FUNCTION {{p}}customs_duty_old
|
||||
IMPORTING
|
||||
iv_value TYPE decfloat34
|
||||
iv_country TYPE string
|
||||
iv_category TYPE string
|
||||
EXPORTING
|
||||
ev_rate TYPE decfloat34
|
||||
ev_duty TYPE decfloat34
|
||||
EXCEPTIONS
|
||||
invalid_value.
|
||||
|
||||
DATA lv_rate TYPE decfloat34.
|
||||
|
||||
CASE iv_category.
|
||||
WHEN 'FOOD'.
|
||||
lv_rate = 5.
|
||||
WHEN 'TEXTILE'.
|
||||
lv_rate = 12.
|
||||
WHEN 'MACHINE'.
|
||||
lv_rate = 3.
|
||||
WHEN OTHERS.
|
||||
lv_rate = 0.
|
||||
ENDCASE.
|
||||
|
||||
IF iv_country = 'CH' OR iv_country = 'DE'.
|
||||
lv_rate = 0.
|
||||
ENDIF.
|
||||
|
||||
ev_rate = lv_rate.
|
||||
ev_duty = iv_value * lv_rate / 100.
|
||||
|
||||
IF ev_duty < 5.
|
||||
ev_duty = 5.
|
||||
ENDIF.
|
||||
|
||||
ENDFUNCTION.
|
||||
53
tasks_gen/eval/G0189/seed/theme_fee.func.abap
Normal file
53
tasks_gen/eval/G0189/seed/theme_fee.func.abap
Normal file
@@ -0,0 +1,53 @@
|
||||
FUNCTION {{p}}theme_fee
|
||||
IMPORTING
|
||||
iv_visitor_type TYPE string
|
||||
iv_tickets TYPE i
|
||||
iv_date TYPE d
|
||||
EXPORTING
|
||||
ev_unit_price TYPE decfloat34
|
||||
ev_total_price TYPE decfloat34
|
||||
ev_discount TYPE decfloat34
|
||||
EXCEPTIONS
|
||||
invalid_visitor_type
|
||||
invalid_tickets.
|
||||
|
||||
DATA lv_base_price TYPE decfloat34.
|
||||
DATA lv_gross TYPE decfloat34.
|
||||
DATA lv_discount_pct TYPE decfloat34.
|
||||
|
||||
IF iv_tickets <= 0.
|
||||
RAISE invalid_tickets.
|
||||
ENDIF.
|
||||
|
||||
CASE iv_visitor_type.
|
||||
WHEN 'ADULT'.
|
||||
lv_base_price = '45.50'.
|
||||
WHEN 'CHILD'.
|
||||
lv_base_price = '25.25'.
|
||||
WHEN 'SENIOR'.
|
||||
lv_base_price = '30.75'.
|
||||
WHEN 'FAMILY'.
|
||||
lv_base_price = '40.00'.
|
||||
WHEN OTHERS.
|
||||
RAISE invalid_visitor_type.
|
||||
ENDCASE.
|
||||
|
||||
" Peak season surcharge
|
||||
IF iv_date IS NOT INITIAL.
|
||||
lv_base_price = lv_base_price + 5.
|
||||
ENDIF.
|
||||
|
||||
" Group discount
|
||||
IF iv_tickets >= 10.
|
||||
lv_discount_pct = 10.
|
||||
ENDIF.
|
||||
IF iv_tickets > 20.
|
||||
lv_discount_pct = 15.
|
||||
ENDIF.
|
||||
|
||||
lv_gross = lv_base_price * iv_tickets.
|
||||
ev_discount = lv_gross * lv_discount_pct / 100.
|
||||
ev_total_price = lv_gross - ev_discount.
|
||||
ev_unit_price = lv_base_price.
|
||||
|
||||
ENDFUNCTION.
|
||||
Reference in New Issue
Block a user