Form NewReturnDialog
- Unit name: Dialogs.NewReturn
- Form name: TNewReturnDialog
- Old form name: unit57, form57 (scanner)
Synopsis
Dialog to collect parameters for new return.
Functionalities
- Dropdown for supplier list (view Suppliers). When a supplier is selected, execute CheckSupplierReason action.
- Checkbox "Damaged".
- Dropdown for return reason. (view ReturnReasons)
- Edit for original invoice number.
- Button for Cancel action.
- Button for OK action.
- Boolean Property "Damaged"
- Integer Property "OrderID"
- Integer Property "SupplierID"
Actions
ChekcSupplierReason
- Enabled when a supplier is selected.
- When executed, checks the following:
- When the returnReasonType field is set, the return reasons dropdown is filled with the corresponding records. The dropdown is disabled if there is no such value.
- Save the value of the returnNeedsInvoice field.
Cancel
- Always enabled.
- Closes the form with the mrCancel modal result.
OK
- Enabled when there is
- A supplier
- If the supplier requires a return reason, a return reason.
- if the supplier requires an invoice, an invoice must have been entered.
-
If an invoice was entered, the existence of the invoice is checked in table OUT. If it does not exist, an error is shown, and the action is aborted.
-
Closes the form with the mrOK modal result.
Tables/Views
-
Suppliers Filtered on 'AllowReturns=1'
-
Remark: the tables ReturnReason and ReturnReasonList will be merged into 1 table.
-
ReturnReasons from table ReturnReasonList, filtered on ReturnReasonType if the ReturnReasonType is set for the selected supplier.
-
Suppliers Filtered on 'AllowReturns=1'