Ga naar inhoud

Form ArticleStockCorrectionForm

  • Unit name: Dialogs.ArticleStockCorrection
  • Form name: ArticleStockCorrectionForm
  • Old form name: Form24 (unit24)

Synopsis

Form to enter stock correction data.

Functionalities

  1. Caption: Stock correction
  2. Radiobutton: plus correction/minus correction.
  3. Supplier dropdown. (Supplier view). Disabled for minus correction.
  4. Stockcode dropdown. (StockCode view)
  5. For plus correction, stock codes 25 and 99 cannot be chosen. A message should be displayed:
    Stock code :StockCode is not allowed, use 75 instead.
    
  6. Quantity spinedit. On change, the max limits must be checked:
  7. Quantity must be less than Max. quantity
  8. Quantity must be less than Max. CC quantity if stockcode is 75. The spinedit must be cleared if one of the conditions is not fulfilled.
  9. Label for "Max. qty.". Only visible for - correcion.
  10. Label for "Duty cleared qty." Only visible for - correcion.
  11. Location dropdown.
  12. Comments edit.
  13. "Lot No" edit. Only visible for + correcion.
  14. "ExpiryDate" date edit. Only visible for + correcion.
  15. "Reception Date" date edit. Only visible for + correcion.
  16. Properties to get/set for all edits/labels.
  17. If the 'Minus' correction is selected, StockControl.GetCCStockQty is called with code 99 to calculate 'Max Duty cleared' value. (should be done only once)

Actions

OK

  1. Active only if quantity, location, stockcode, comment and supplier are not empty.
  2. For plus corrections, stock codes must differ from 25 and 99.
  3. For plus corrections, reception date must be filled.
  4. For minus corrections, the quantity must be less than the available quantity. (max qty)
  5. For minus corrections and stockcode code 75, the quantity must be less than the CC quantity. (Duty cleared qty)
  6. When executed, the user is presented with a confirmation
    The stock will (de/in)crease with %d pieces. Do you want to continue?
    
  7. When the user confirms, the form's modalresult is set to mrOK

Cancel

The form's modalresult is set to mrCancel.

Tables/Views

  • Supplier For supplier dropdown (global lookup)
  • Lcocation For location dropdown (global lookup)
  • StockCode for stockcode dropdown (global lookup)

Needed Service Calls

StockControl.GetCCStockQty

Needed to call stock quantity. Needs Article ID and code 99.

Reports

  1. ArticleMoves When asked, the ArticleMovesParameters dialog is shown toget the parameters.