Class MovementAdminAction
java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction
org.bgerp.action.base.BaseAction
org.bgerp.plugin.inventoru.action.QueueScreenAction
org.bgerp.plugin.inventoru.action.MovementAdminAction
Receipt and inventory-count adjustment of stock, over the journal of movements. Each operation
goes by its permission node: by default to the stores the user runs (their editing groups), a
warehouse admin to every store, the option
stores of the node widens or narrows it —
see checkTarget(Connection, DynActionForm, String, int, int).
The journal itself is a queue like every other entity's (QueueScreenAction): it used to
be a warehouse picker and the last 500 rows of that one warehouse, cut off without a word and
with nothing to filter or page by — a journal that cannot be asked a question is a wall of text.
Reading it and writing into it go by different rules, deliberately. Whose movements a person may
read is one question with one answer for the whole plugin — QueueEntity.accessRestriction(Connection, DynActionForm)
over the warehouses they work with — and it holds here exactly as on the user screen, so the same
journal never answers differently depending on which door it was opened by. Writing is narrower:
a receipt or a correction reaches only the warehouses of the person's editing groups (see
checkTarget(Connection, DynActionForm, String, int, int)), because putting stock somewhere is a stronger claim than knowing what
stands there. The old screen tied reading to the write rule as a side effect of listing the
warehouses of the picker, not by intent; the rows it hid are ones the same person could read on
the user screen anyway. The journal is still behind its own nodes (queueFilter,
queueShow), so an existing install shows nothing here until they are granted.
Mapped at /admin/plugin/inventoru/movement.do-
Field Summary
Fields inherited from class BaseAction
l, log, MAPPER, PATH_JSP_ADMIN, PATH_JSP_OPEN, PATH_JSP_USER, PATH_JSP_USERMOB, setupFields inherited from class org.apache.struts.actions.DispatchAction
clazz, methods, typesFields inherited from class org.apache.struts.actions.BaseAction
messagesFields inherited from class org.apache.struts.action.Action
servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.struts.action.ActionForwardadjust(DynActionForm form, ConnectionSet conSet) Corrects the recorded quantity to match an actual physical count (инвентаризация).protected QueueEntityThe entity the screen lists.protected StringgetScreenTitle(DynActionForm form) Screen title, shown in the browser tab.protected StringPermission node of the card the rows link to, e.g.protected StringEntity specific buttons shown above the queue selector — creating a row, opening a related catalogue.org.apache.struts.action.ActionForwardqueueFilter(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardqueueShow(DynActionForm form, ConnectionSet conSet) org.apache.struts.action.ActionForwardreceipt(DynActionForm form, ConnectionSet conSet) Manual stock-in, independent of the 1C import — closes the gap where the only way to add quantity to the ERP was via 1C sync (nothing to do if 1C is down, or the material never had a 1C nomenclature entry to begin with).org.apache.struts.action.ActionForwardunspecified(DynActionForm form, ConnectionSet conSet) Default action method if no parameter 'action' passed.org.apache.struts.action.ActionForwardwriteoffUnit(DynActionForm form, ConnectionSet conSet) Writes off one unit by its serial number: the only way a wrongly placed unit leaves a warehouse without a process behind it.Methods inherited from class QueueScreenAction
queueFilterScreen, queueScreen, queueShowScreenMethods inherited from class BaseAction
checkModified, dispatchMethod, getParameter, html, html, json, json, permissionCheck, restoreRequestParams, unspecified, updatePersonalizationMethods inherited from class org.apache.struts.actions.DispatchAction
cancelled, execute, getMethod, getMethodName, unspecifiedMethods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Constructor Details
-
MovementAdminAction
public MovementAdminAction()
-
-
Method Details
-
unspecified
public org.apache.struts.action.ActionForward unspecified(DynActionForm form, ConnectionSet conSet) throws Exception Description copied from class:BaseActionDefault action method if no parameter 'action' passed. Overwrite and implement.- Overrides:
unspecifiedin classBaseAction- Parameters:
form-conSet-- Returns:
- the action forward
- Throws:
Exception
-
queueFilter
public org.apache.struts.action.ActionForward queueFilter(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
queueShow
public org.apache.struts.action.ActionForward queueShow(DynActionForm form, ConnectionSet conSet) throws Exception - Throws:
Exception
-
getEntity
Description copied from class:QueueScreenActionThe entity the screen lists.- Specified by:
getEntityin classQueueScreenAction
-
getScreenTitle
Description copied from class:QueueScreenActionScreen title, shown in the browser tab.- Specified by:
getScreenTitlein classQueueScreenAction
-
getShowAction
Description copied from class:QueueScreenActionPermission node of the card the rows link to, e.g./user/plugin/inventoru/store:show; the row menu is hidden without it.- Specified by:
getShowActionin classQueueScreenAction
-
getToolbarJsp
Description copied from class:QueueScreenActionEntity specific buttons shown above the queue selector — creating a row, opening a related catalogue. The queue itself has no idea what can be done with what it lists.- Overrides:
getToolbarJspin classQueueScreenAction- Returns:
- path of a JSP to include, or
nullwhen the entity has no such buttons.
-
receipt
public org.apache.struts.action.ActionForward receipt(DynActionForm form, ConnectionSet conSet) throws Exception Manual stock-in, independent of the 1C import — closes the gap where the only way to add quantity to the ERP was via 1C sync (nothing to do if 1C is down, or the material never had a 1C nomenclature entry to begin with).- Throws:
Exception
-
adjust
public org.apache.struts.action.ActionForward adjust(DynActionForm form, ConnectionSet conSet) throws Exception Corrects the recorded quantity to match an actual physical count (инвентаризация). The admin enters the counted (actual) quantity, not a delta — recording the delta as an 'adjustment' movement is an implementation detail the operator shouldn't have to compute by hand. A reason is mandatory: this silently changes what the system believes is true, so an unexplained correction is not acceptable audit trail.- Throws:
Exception
-
writeoffUnit
public org.apache.struts.action.ActionForward writeoffUnit(DynActionForm form, ConnectionSet conSet) throws Exception Writes off one unit by its serial number: the only way a wrongly placed unit leaves a warehouse without a process behind it. Until this existed the two sides of such a mistake locked each other. The card of the unit refused deletion while the unit stood on a warehouse ("спишите его, потом удаляйте"), the warehouse field of the card could not be emptied, moving the unit elsewhere changed nothing, and a stocktaking correction refused to take the balance below the units standing there — telling the person to write those units off by serial, which no screen offered. Equipment imported by mistake stayed on the books of an installer for good. The movement does both halves of the cleanup at once: the balance of the position drops by one and the unit goes off every warehouse (seeMovementDAO.moveDevices), after which the card deletes as any other. Everything else — a unit under an active reserve, a warehouse whose units 1C keeps — is refused by the DAO, the same rules as for any write-off.- Throws:
Exception
-