RMA HQ
Overview
RMA HQ is the head-office build of a two-build RMA screen set; RMA Staff is the branch-staff build of the same code, and RMA Supplier is the supplier’s view of the same returns. Together they run a return line by line on a generic document: staff raise the return, HQ approves each item, the supplier accepts or rejects each approved item, and two printed notes — the RGPL (the note that travels with the approved goods) and the discrepancy note (the items the supplier rejected) — close the loop.
It is not the Internal RMA applet. That one is built on
service notes (bl_svc_issue_hdr) plus the INTERNAL_SALES_RMA and INTERNAL_SUPPLIER_RTV
documents, has its own repository and a full reference page. This set keeps its state in
line-level extension rows (bl_fi_generic_doc_ext) on a generic document instead, and its UI
source could not be found.
rma-applet/prod/rma-applet-elements.js has no source repository in any
organisation this documentation server can read (checked 2026-09-16). Nothing on this page
describes a screen that has not been read; when the repository is located the page will be
completed from it.Where it fits
| Registry | RMA_HQ · name RMA HQ · type TNT-APPLET · ACTIVE · applet_shortcode rma. An earlier rma_hq row (lower-case) is DELETED; it pointed the same route at the Staff bundle |
| Route | applet/tnt/wavelet/rma-applet — the same route and the same custom element name (rma-applet-elements-) as RMA Staff. The two rows differ only in the bundle they load (rma-applet/prod/… here, rma-staff-applet/prod/… there): two builds of one code base, not two applets. The issues filed against them say the same — every fix is “for both staff and HQ applet” |
| Upstream | A return raised by branch staff in RMA Staff |
| Downstream | RMA Supplier accepts or rejects what HQ approved; the RGPL and discrepancy printouts |
| Module | Sales & CRM (customer returns), Inventory (the goods) |
Screens and menus
Not documented — no source read. The two open issues against the pair name three modules: an RMA listing, an Edit RMA module and an RGPL note module, and say that “the first two modules” work while Edit RMA and RGPL note do not (Jira-era defects from 2023, still open in the tracker on 2026-03-05).
Configuration
Before you can use it
| Prerequisite | Where it is set | Why it matters here |
|---|---|---|
| A generic document type with RMA extension rows | Backend — the line-level bl_fi_generic_doc_ext param codes below | The HQ approval and supplier acceptance are values on those rows |
| Google Docs print templates for the RGPL and discrepancy notes | Wherever the template document IDs are kept for this tenant | The print endpoint takes a templateDocId and a printServiceClassName on every call (see Printing) |
| Job-processor templates, if a tenant wants statuses advanced automatically | Platform job-processor configuration | Tenant-specific processors exist in the backend under controller/tenant/custom/ that move these statuses after a configured inactivity period; they are enabled per tenant, not from this applet |
Applet settings
No source read (bundle repository not found, 2026-09-16). Not documented.
Feature visibility / permissions
bl_applet_client_side_perm_dfn has no rows for RMA_HQ. The sibling code RMA_Staff
carries two — SHOW_VIEW_REQUEST_BUTTON and SHOW_APPROVAL_BUTTONS — which, since the builds
share a code base, are almost certainly checked by this build too and are simply not seeded for
this code: a role cannot be granted them here.
Server-side, whatever generic document type the build uses is gated by that type’s
TNT_API_DOC_<TYPE>_* family through the standard generic-document controller.
Fields
Not documented — no form model read. The backend shows what the lines carry:
bl_fi_generic_doc_ext.param_code (line level) | Values seen in the backend | Meaning |
|---|---|---|
rma_itm_hq_approval | RMA_ITM_HQ_APPROVED | HQ has approved this item for return |
rma_itm_supplier_acceptance | RMA_ITM_SUPPLIER_REJECTED | The supplier rejected this item |
serial_number | free text | The unit’s serial number |
rma_type | free text | The kind of return |
return_reason | free text | Why it came back |
consignment_number (header level) | free text | The consignment the goods travel under |
The header’s client_doc_1 is printed as the RMA code, and doc_remarks as the line remarks.
Lifecycle and effects
Not a document type of its own. The state machine lives in the extension rows above: an item moves
from raised → RMA_ITM_HQ_APPROVED (HQ) → accepted or RMA_ITM_SUPPLIER_REJECTED (supplier). The
backend carries no validator for those transitions — nothing in blg-akaun-platform-java rejects a
value on rma_itm_hq_approval or rma_itm_supplier_acceptance; the order of steps is enforced by
the UI, if at all.
Posting and stock. Which generic document type these builds create is not visible without the
UI source. Both candidate RMA types in ServerDocTypes — INTERNAL_SALES_RMA and
INTERNAL_PURCHASE_RMA — are declared 0 / 0: every line they write carries quantity signum 0 and
amount signum 0, so no stock moves and no journal posts on FINAL. If the build uses a different type,
that statement does not transfer. The Internal RMA page carries the INTERNAL_SALES_RMA proof.
Printing. Both notes are produced by GET …/generic-documents/{docType}/print-pdf/{guid}?templateDocId=…&printServiceClassName=…
(GenericDocumentController.java:1252-1296): the controller checks the document type’s read
permission, instantiates the named class by reflection, and the class copies a Google Docs
template, fills it and returns a PDF.
| Note | Class | Lines printed |
|---|---|---|
| RGPL | RmaRGPLPrintService | Lines whose rma_itm_hq_approval is RMA_ITM_HQ_APPROVED |
| Discrepancy | RmaDiscrepancyPrintService | Lines whose rma_itm_supplier_acceptance is RMA_ITM_SUPPLIER_REJECTED |
Placeholders both templates must contain: {{rma-code}}, {{supplier-name}}, {{branch-descr}},
{{doc-amount-std}}, {{consignment-number}}, and in the item table {{item-count}},
{{item-code}}, {{item-description}}, {{item-qty}}, {{rma-type}}, {{serial-number}},
{{return-reason}}, {{remarks}}. A template without {{item-count}} gets no item rows — the
service finds the table by that placeholder.
The endpoint is marked @Deprecated in the backend, with a note that it stays until its one
remaining consumer migrates.
A backend listing that may belong to this pair. GET …/svc/entity-rmas/{entityType}/backoffice-ep/query
(RMAEntityController) returns service notes (bl_svc_issue_hdr) not yet attached to any
bl_svc_doc_line, filtered like the service-note listing; for SUPPLIER it requires a
doc_hdr_guid (“Kindly Provide an Appropriate doc_hdr_guid for Supplier”). No UI repository this
server can read calls it. It is listed here because its name and shape match this applet family; it
is not attributed to any screen.
Related applets
- RMA Staff — the other build of the same code, for branch staff.
- RMA Supplier — the supplier’s acceptance step.
- Rma Applet (Internal) — the service-note based RMA applet, fully documented; not the same product.
- Warranty Admin — the warranty terms that decide who pays.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Edit RMA does not work | Open defect filed against both builds (blg-intranet#4424, 2023 Jira key, still open) | No workaround recorded |
| RGPL note module does not work | Open defect filed against both builds (blg-intranet#4425) | No workaround recorded |
| The RGPL prints with no item rows | Only lines with rma_itm_hq_approval = RMA_ITM_HQ_APPROVED are printed, and only into a table that contains {{item-count}} | Approve the items first; check the template has the placeholder |
| The discrepancy note is empty | Only lines with rma_itm_supplier_acceptance = RMA_ITM_SUPPLIER_REJECTED print | Nothing was rejected |
| Print returns 400 with no message | printServiceClassName does not name a print provider — the controller catches the ClassCastException and returns a bare bad request | Pass the fully qualified class name of one of the two print services |
| Items advance to approved / accepted without anyone acting | A tenant-specific job processor is enabled that moves the statuses after an inactivity period | Check the tenant’s job-processor templates |