個別報酬
このトピックでは、個別報酬プロセスの実装に関する考慮事項を示します。
報酬の設定管理、個別報酬および個人報酬
通常は、このような場合にフィールド値のデフォルトと検証を使用できます。
- 次の四半期の1日より後に従業員のみが報奨を作成できるように「時期」の日付をデフォルト設定します。
- 現在の会計年度(4月1日から3月31日)になるように「時期」の日付を検証します
- 臨時賞与が2024年4月1日または2024年10月1日に有効であることを検証します
- 新規採用賞与が$3000を超えないことを検証します
- 車両手当増加が10%以下であることを検証します
- 新規報酬が月の17日以前に開始されることを検証します
- 報奨提示が一度に1つのみ送信されることを検証します
- バスとタクシーの払戻が一緒に請求されていないことを検証します
この表は、報酬の設定管理、個別報酬および個人報酬に対してサポートされている属性、例外および実装に関する推奨事項を示しています。
これは、「自分のクライアント・グループ」タブからアクセスする「報酬の設定管理」ページ、「自分のチーム」タブと「自分のクライアント・グループ」タブからアクセスする「個別報酬」ページ、および「自分」タブからアクセスする「個人拠出金」ページに適用されます。
値のデフォルト設定の条件内 | フィールド値のデフォルト設定 | 値の検証の条件内 | フィールド値の検証 | 実装ガイドライン |
---|---|---|---|---|
|
|
「時期」セクション
「報酬」セクション
|
これらのフィールドは、拡張式を使用して検証できます
レコード・レベル属性
セクション・レベル属性
|
|
例
報奨が次の四半期の1日より後に従業員のみが作成できるようにするデフォルト日付。
拡張式
let effectiveDate = new Date();
let currentQuarter = Math.floor((effectiveDate.getMonth() + 3) / 3);
// Get first date of current quarter
effectiveDate.setDate(1);
effectiveDate.setMonth((currentQuarter - 1) * 3);
// Use this technique for year rollover
effectiveDate.setMonth(effectiveDate.getMonth() + 3);
return effectiveDate.toISOString().slice(0, 10);
現在の会計年度(4月1日から3月31日)になるように「時期」の日付を検証します
拡張式
let effectiveDate = $fields.individualCompensationDetails.EffectiveDate.$value();
if (effectiveDate) {
// Fetch current financial year start date
let currentDate = new Date();
let fyStartDate = null, fyEndDate = null;
if (currentDate.getMonth() + 1 <= 3) {
fyStartDate = new Date(currentDate.getFullYear() - 1, 3, 1);
fyEndDate = new Date(currentDate.getFullYear(), 2, 31);
} else {
fyStartDate = new Date(currentDate.getFullYear(), 3, 1);;
fyEndDate = new Date(currentDate.getFullYear() + 1, 2, 31);
}
return (new Date(effectiveDate) < fyStartDate || new Date(effectiveDate) > fyEndDate);
}
return false;
新規採用賞与が$3000を超えないことを検証します
拡張式
if ($fields.individualCompensationDetails.PlanId.$value() === '100000018708168'
&& Number($fields.individualCompensationDetails.ValueString.$value()) > 3000) {
return true;
}
return false;
車両手当増加が10%以下であることを検証します
拡張式
if ($fields.individualCompensationDetails.ComponentId.$numberValue() === 300100010424490
&& $fields.individualCompensationDetails.Mode.$initialValue() === 'EDIT') {
let proposedValue = Number($fields.individualCompensationDetails.ValueString.$value());
let currentValue = Number($fields.individualCompensationDetails.ValueString.$initialValue());
if (proposedValue > (1.1 * currentValue))
return true;
}
return false;
この例では、ModeのinitialValueを使用して、有効日更新シナリオを処理します。
有効日更新の場合、新規レコードは新規に生成された分割であるため、モードは「CREATE」になります。
月の17日以前に開始される新規交付の検証
拡張式
if ($fields.individualCompensationDetails.Mode.$value() == 'CREATE'
&& $fields.individualCompensationDetails.EffectiveStartDate.$value()) {
let planSD = new Date($fields.individualCompensationDetails.EffectiveStartDate.$value());
return (planSD.getDate() > 17)
}
return false;
報奨提示が一度に1つのみ送信されることを検証します
拡張式
let currentAllocations = $fields.individualCompensationDetails.CurrentAllocations.$value();
if (currentAllocations && currentAllocations.length) {
let newAllocationCount = 0;
for (let allocation of currentAllocations) {
if (allocation.Mode == 'CREATE')
newAllocationCount++;
}
if(newAllocationCount > 1)
return true;
}
return false;
バスとタクシーの払戻が一緒に請求されていないことを検証します
拡張式
let currentAllocations = $fields.individualCompensationDetails.CurrentAllocations.$value();
if (currentAllocations && currentAllocations.length) {
let busBonusPresent = false;
let taxiBonusPresent = false;
for (let allocation of currentAllocations) {
if (allocation.PlanId == '300100113565911')
busBonusPresent = true;
else if (allocation.PlanId == '300100113565893')
taxiBonusPresent = true;
}
return (busBonusPresent && taxiBonusPresent);
}
return false;
フィールド詳細
フィールド | フィールド・アクセサ | タイプ | コメント |
---|---|---|---|
処理日 | $fields.individualCompensationDetails.EffectiveDate.$value() |
||
レコード・レベル属性 | |||
プラン | $fields.individualCompensationDetails.PlanId.$value() | 数値 | PlanIdプラン名を表示するプラン値リストを使用して選択 |
プラン・オプション | $fields.individualCompensationDetails.ComponentId.$value() |
数値 | OptionIdは、<Plan Name>という書式の値を表示するオプションLOVを使用して選択されます - <Option Name> |
開始日 | $fields.individualCompensationDetails.EffectiveStartDate.$value() |
文字列 |
文字列(フォーマット): yyyy-MM-dd)としての割当て開始日 日付比較には拡張式モードが必要です。 |
終了日 | $fields.individualCompensationDetails.EffectiveEndDate.$value() |
文字列 |
割当て終了日を文字列(フォーマット: yyyy-MM-dd)として指定 日付比較には拡張式モードが必要です。 |
値 | $fields.individualCompensationDetails.ValueString.$value() |
文字列 |
文字列としてのプライマリ入力パラメータ。 文字列以外のプライマリ入力パラメータには拡張式モードが必要です。 数値フィールドの場合、この値は算術演算の「数値」に型キャストする必要があります。 同様に、日付フィールドの場合、日付比較では値を日付にタイプ・キャストする必要があります。 |
通貨 | $fields.individualCompensationDetails.DisplayCurrency.$value() |
文字列 | 金額プライマリ入力パラメータの通貨 |
法的エンティティ | $fields.individualCompensationDetails.LegalEntityId.$value() |
数値 | LegalEntityId LE名を表示する法的エンティティ値リストを使用して選択 |
作成または編集 | $fields.individualCompensationDetails.Mode.$value() |
文字列 | モード属性は、レコードを新しく作成するか既存のレコードを作成するかを決定することです。 |
セクション・レベル属性 | |||
現在の割付 | $fields.individualCompensationDetails.CurrentAllocations.$value() |
配列 | オブジェクト構造
|
トラブルシューティング
ICオブジェクトのすべての属性を出力するには:
- 条件のない検証ルールの作成
- 次の式を使用して、提案された値を表示するメッセージを追加:
[[ JSON.stringify($fields.individualCompensationDetails.$value(), null, 2) ]]
- 次の式を使用して、initialValue (EDITケースのレコードのデータベース値)を表示する別のメッセージを追加:
[[ JSON.stringify($fields.individualCompensationDetails.$initialValue(), null, 2) ]]
- 新しい割当ての場合、initialValueはデータベースに存在しないためNULLになります
-
セクション・レベルの検証にも同じことが適用されます。 続行/送信時にトリガーされます。
-
CurrentAllocations配列の値を確認するには、メッセージの重大度をerrorに設定します。それ以外の場合は、submitまたはnextセクションにナビゲートできます。
検証ルール定義

結果
