All tables
tables · table

rejaccept_hdr

The rejaccept_hdr table serves as the header record for Customer Rejection Acceptances. Within the manufacturing and inventory workflow, this table documents the formal receipt and acceptance of items returned or rejected by customers. It captures high-level transaction details, including associated Gate Entry numbers (gentryno), original invoice references, and customer identifiers.

Row count
2,408
Last entry
2026-01-14
Source
tables

Columns

18
ColumnTypeNullableMeaning
indexintegerNoInternal system primary key
compcodestringNoUnique identifier for the company/branch
rejaccept_nointegerNoUnique Rejection Acceptance transaction number
rejaccept_datedatetimeNoDate the rejection was officially accepted
gentrynointegerYesGate Entry Number for the physical return
gentrydatedatetimeYesDate of the Gate Entry
billnonumberYesAssociated Bill number
billdatedatetimeYesDate of the associated Bill
invnointegerYesOriginal Invoice number being rejected against
invdatedatetimeYesOriginal Invoice date
invamtnumberYesTotal value of the rejected invoice/items
custcodestringNoUnique identifier for the Customer
lotnostringYesBatch or Lot number of the returned material
noprcodestringYesNext Operation Code (Likely stage designation)
againstinvstringYesFlag indicating if rejection is against a specific invoice
variantstringYesProduct variant identifier
LocationstringYesPhysical storage location identifier
Item_Assy_FlagstringYesIndicator for Item vs Assembly

Full documentation

### 1) Overview
 The `rejaccept_hdr` table serves as the header record for **Customer Rejection Acceptances**. Within the manufacturing and inventory workflow, this table documents the formal receipt and acceptance of items returned or rejected by customers. It captures high-level transaction details, including associated Gate Entry numbers (`gentryno`), original invoice references, and customer identifiers.
 
 Based on referencing stored procedures (e.g., `FGStock`, `WIPStockSFR`), this table is critical for calculating accurate stock levels, as it accounts for returned goods being re-added to inventory (often specifically designated as "CLOSE" or finished goods via the `noprcode` column).
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Internal system primary key | | Primary Key |
 | **compcode** | string | No | Unique identifier for the company/branch | e.g., "DAS", "BAM" | Join, Filter |
 | **rejaccept_no** | integer | No | Unique Rejection Acceptance transaction number | | Join, Filter |
 | **rejaccept_date** | datetime | No | Date the rejection was officially accepted | | Filter, Reporting |
 | **gentryno** | integer | Yes | Gate Entry Number for the physical return | | Reference |
 | **gentrydate** | datetime | Yes | Date of the Gate Entry | | Reference |
 | **billno** | number | Yes | Associated Bill number | | Reference |
 | **billdate** | datetime | Yes | Date of the associated Bill | | Reference |
 | **invno** | integer | Yes | Original Invoice number being rejected against | | Reference |
 | **invdate** | datetime | Yes | Original Invoice date | | Reference |
 | **invamt** | number | Yes | Total value of the rejected invoice/items | | Aggregation |
 | **custcode** | string | No | Unique identifier for the Customer | Links to `cust` | Join, Filter |
 | **lotno** | string | Yes | Batch or Lot number of the returned material | | Join, Filter |
 | **noprcode** | string | Yes | Next Operation Code (Likely stage designation) | e.g., "CLOSE" (Likely) | Filter |
 | **againstinv** | string | Yes | Flag indicating if rejection is against a specific invoice | "Y", "N" | Filter |
 | **variant** | string | Yes | Product variant identifier | | Filter |
 | **Location** | string | Yes | Physical storage location identifier | Links to `location` | Join, Filter |
 | **Item_Assy_Flag** | string | Yes | Indicator for Item vs Assembly | "I" (Item), "A" (Assembly) | Filter |
 
 ### 3) Relationships & Join Map
 
 #### Logical Primary Key
 * **`compcode`**, **`rejaccept_no`**: Composite key used to uniquely identify a rejection header across the system.
 
 #### Joins (STRICTly via SCHEMA_MAP)
 * **`rejaccept_dtl`**: Join on `compcode` and `rejaccept_no`. This is the primary child table containing item-specific rejection details.
 * **`cust`**: Join on `compcode` and `custcode` to retrieve customer names and credit terms.
 * **`location`**: Join on `compcode` and `location` (Likely case-insensitive mapping to `Location` in `rejaccept_hdr`) to identify the warehouse or bin.
 * **`company`**: Join on `compcode` to retrieve organizational metadata.
 
 #### Inference Joins (Likely)
 * **`invhdr`**: Joins on `compcode` and `invno` (Likely) when `againstinv` is "Y".
 * **`itemmas`**: While not directly joined at the header level, the `lotno` and `compcode` are frequently used in tandem with `rejaccept_dtl` to reconcile stock in `itemmas`.