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
37
38
39
| Quintiq file version 2.0
| #parent: #root
| StaticMethod ValidateInput (
| output String feedback_o,
| output String sanitycheckfeedback_o,
| Account_MP account,
| String costdriver,
| Date start,
| String timeunit,
| Number lengthoftime,
| Real cost,
| AccountCost accountcost,
| Unit unit
| ) declarative remote as Boolean
| {
| Description: 'Check for input obtained from UI'
| TextBody:
| [*
| // soh yee Nov-4-2012 (created)
| feedback_o := '';
| sanitycheckfeedback_o := '';
|
| valid := AccountCost::ValidateInput( feedback_o, sanitycheckfeedback_o, account, costdriver, start, timeunit, lengthoftime, cost, accountcost );
|
| if( valid and ( not isnull( unit ) and not unit.HasCapacityTypeTime() and costdriver = Translations::MP_AccountAssignmentCostDriverTime() ) )
| {
| feedback_o := Translations::MP_UnitAccount_ViolateHasValidCapacityTypeOfUnit( costdriver, unit.CapacityType() )
| sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning();
| }
|
| if( feedback_o <> '' and not isnull( accountcost ) )
| {
| instance := AccountCost::GetInstanceText( accountcost );
| feedback_o := SanityCheckMessage::GetFormattedMessage( instance, feedback_o );
| }
|
| return feedback_o = '';
| *]
| }
|
|