Table of Contents

R39819 WarehouseReconciliation - Check Valid Review Status

Name Value
Code R39819
Entity Logistics.Wms.WarehouseReconciliations
Name CheckValidReviewStatus
Attribute WarehouseReconciliationDetails.ReviewStatus, WarehouseReconciliationDetails.CountedQuantity
Layer Back-End
Events ClientCommit
Modify YES
Action For all Warehouse Reconciliation Details:

If (ReviewStatus != ReviewStatus.GetDatabaseValue())

If (ReviewStatus == Created)
Validate that:
ReviewStatus.GetDatabaseValue() = Created

If (ReviewStatus == Started)
Validate that:
ReviewStatus.GetDatabaseValue() = Started

If (ReviewStatus == Finished)
Validate that:
ReviewStatus.GetDatabaseValue() = Finished

If (ReviewStatus == Recount)
No validation

If (ReviewStatus == Approved)
Validate that one of the following is true:
ReviewStatus.GetDatabaseValue() = Approved
ReviewStatus.GetDatabaseValue() = Finished
(ReviewStatus.GetDatabaseValue() = Recount) && (CountedQuantity != Null)
(ReviewStatus.GetDatabaseValue() = Cancelled) && (CountedQuantity != Null)

If (ReviewStatus == Cancelled)
Validate that:
ReviewStatus.GetDatabaseValue() != Started
Description Validates the Review Status selected for all Warehouse Reconciliation Details at Client Commit.

The rule checks whether the newly selected Review Status is valid according to the current Review Status stored in the database for each detail line.

The validation is based on the current Review Status of each detail line.

Allowed transitions:
- Created -> only Created
- Started -> only Started
- Finished -> only Finished
- Recount -> always allowed
- Approved -> allowed from Approved, Finished, Recount with CountedQuantity, or Cancelled with CountedQuantity
- Cancelled -> allowed from any status except Started

If the selected Review Status is not valid for the current status of a detail line, the rule throws the corresponding error message for that line.
Message The current Review Status for line no. "{LineNo}" is Created. You cannot change the Review Status to "{ReviewStatus}".

From the current status, the Review Status can only be changed to Recount or Cancelled.

The current Review Status for line no. "{LineNo}" is Started. This status means that there are active Warehouse Orders for counting this line, so the Review Status cannot be changed until the counting is finished.

From the current status, the Review Status can only be changed to Recount.



The current Review Status for line no. "{LineNo}" is Finished. You cannot change the Review Status to "{ReviewStatus}".

From the current status, the Review Status can only be changed to Recount, Approved, or Cancelled.



The current Review Status for line no. "{LineNo}" is Recount. You cannot change the Review Status to "{ReviewStatus}".

From the current status, the Review Status can only be changed to Approved or Cancelled. The Approved status can be set only if the Counted Quantity field has a value.



The current Review Status for line no. "{LineNo}" is Approved. You cannot change the Review Status to "{ReviewStatus}".

From the current status, the Review Status can only be changed to Recount or Cancelled.



The current Review Status for line no. "{LineNo}" is Cancelled. You cannot change the Review Status to "{ReviewStatus}".

From the current status, the Review Status can only be changed to Recount or Approved. The Approved status can be set only if the Counted Quantity field has a value.
Version Introduced in: 26.2
Revocable NO

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.