tables · table
fghdr
The fghdr table (likely standing for Finished Goods Header) serves as the primary transaction log for the procurement and receipt of Semi-Finished (SF) goods from external suppliers. In the context of the ERP system, it tracks the lifecycle of an incoming material receipt note (MRP), including challan quantities, physical receipt, quality acceptance/rejection, and associated financial details like item rates, bill amounts, and GST components.
Row count
7,042
Last entry
2026-01-14
Source
tables
Columns
29| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key (Internal) |
compcode | string | Yes | Company Code |
mrpno | number | Yes | Material Receipt Note Number |
mrpdate | datetime | Yes | Date of Material Receipt Note |
gpno | integer | Yes | Gate Pass Number |
gpdate | datetime | Yes | Gate Pass Entry Date |
pono | string | Yes | Purchase Order Number |
billno | number | Yes | Supplier Invoice/Bill Number |
billdate | datetime | Yes | Supplier Invoice/Bill Date |
itemrate | number | Yes | Purchase Rate per unit |
chqty | number | Yes | Quantity as per Supplier Challan |
recqty | number | Yes | Actual Quantity Received |
acptqty | number | Yes | Quantity Accepted after QC |
rejqty | number | Yes | Quantity Rejected after QC |
irno | integer | Yes | Inspection Report Number |
irdate | datetime | Yes | Inspection Date |
supcode | string | Yes | Supplier Unique Code |
itemcode | string | Yes | Item/Product Unique Code |
lotno | string | Yes | Supplier/Internal Lot Number |
billamount | number | Yes | Total Invoice Value (Net) |
username | string | Yes | User who processed the entry |
noprcode | string | Yes | Process or Operation Code |
heatno | string | Yes | Material Heat Number |
cgst_amt | number | Yes | Central GST Amount |
sgst_amt | number | Yes | State GST Amount |
igst_amt | string | Yes | Integrated GST Amount |
Vou_Auth_flag | string | Yes | Voucher Authorization Status |
Auth_Flag | string | Yes | General Authorization Status |
st38 | string | Yes | Form 38 or Statutory Reference |
Full documentation
### 1) Overview The `fghdr` table (likely standing for **Finished Goods Header**) serves as the primary transaction log for the procurement and receipt of Semi-Finished (SF) goods from external suppliers. In the context of the ERP system, it tracks the lifecycle of an incoming material receipt note (MRP), including challan quantities, physical receipt, quality acceptance/rejection, and associated financial details like item rates, bill amounts, and GST components. Key characteristics include: - **Transaction Tracking**: Records the link between Gate Passes (`gpno`), Purchase Orders (`pono`), and Material Receipt Notes (`mrpno`). - **Quality Control**: Segregates quantities into Challan (`chqty`), Received (`recqty`), Accepted (`acptqty`), and Rejected (`rejqty`). - **Financial Integration**: Stores item rates and tax amounts (CGST/SGST/IGST) used for generating purchase registers and GST input reports. - **Traceability**: Maintains `lotno` and `heatno` for material tracking from the supplier into the production/inventory pipeline. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key (Internal) | Incremental | PK | | **compcode** | string | Yes | Company Code | e.g., "DAS", "BAM" | Filter/Join | | **mrpno** | number | Yes | Material Receipt Note Number | e.g., 76.0, 104.0 | Join/Group | | **mrpdate** | datetime | Yes | Date of Material Receipt Note | | Temporal Analysis | | **gpno** | integer | Yes | Gate Pass Number | | Tracking | | **gpdate** | datetime | Yes | Gate Pass Entry Date | | Audit | | **pono** | string | Yes | Purchase Order Number | | Join to `sfpo`/`cpohdr` | | **billno** | number | Yes | Supplier Invoice/Bill Number | | Reference | | **billdate** | datetime | Yes | Supplier Invoice/Bill Date | | Reference | | **itemrate** | number | Yes | Purchase Rate per unit | | Calculation | | **chqty** | number | Yes | Quantity as per Supplier Challan | | Reconciliation | | **recqty** | number | Yes | Actual Quantity Received | | Reconciliation | | **acptqty** | number | Yes | Quantity Accepted after QC | | Inventory Update | | **rejqty** | number | Yes | Quantity Rejected after QC | | Debit Note Basis | | **irno** | integer | Yes | Inspection Report Number | | QC Link | | **irdate** | datetime | Yes | Inspection Date | | Audit | | **supcode** | string | Yes | Supplier Unique Code | e.g., "RF", "ST" | Join to `suppmas` | | **itemcode** | string | Yes | Item/Product Unique Code | e.g., "CP-00" | Join to `itemmas` | | **lotno** | string | Yes | Supplier/Internal Lot Number | | Traceability | | **billamount** | number | Yes | Total Invoice Value (Net) | | Financials | | **username** | string | Yes | User who processed the entry | | Audit | | **noprcode** | string | Yes | Process or Operation Code | e.g., "CLOSE", "HARD" | Join to `itemopr` | | **heatno** | string | Yes | Material Heat Number | | Traceability | | **cgst_amt** | number | Yes | Central GST Amount | | Taxation | | **sgst_amt** | number | Yes | State GST Amount | | Taxation | | **igst_amt** | string | Yes | Integrated GST Amount | | Taxation | | **Vou_Auth_flag** | string | Yes | Voucher Authorization Status | 'Y', 'N' | Accounting Logic | | **Auth_Flag** | string | Yes | General Authorization Status | 'Y', 'N' | Approval Logic | | **st38** | string | Yes | Form 38 or Statutory Reference | | Compliance | ### 3) Relationships & Join Map #### Real Physical Joins (Authoritative): - **suppmas**: Join on `compcode` and `supcode` to retrieve supplier names and addresses for purchase registers. - **itemmas**: Join on `compcode` and `itemcode` to get item descriptions, part numbers, and HSN codes. - **sfpo / cpohdr**: Join on `compcode` and `pono` to link receipts back to the original Semi-Finished Purchase Order. - **srnduty**: Join on `compcode` and `mrpno` to retrieve tax breakups (VAT/GST duties) used in views like `VATC4` and `LP3`. - **debithdr / debitdtl**: Join on `compcode`, `mrpno`, and `itemcode` (likely) to process quantity rejections into debit notes. - **itemopr**: Join on `compcode`, `itemcode`, and `noprcode` (mapping to `oprcode`) to calculate process-specific weights or next operation balances. #### Process Inferences (Likely): - **goodsbal**: Linked via `compcode` and `itemcode` for opening balance calculations in stock reports. - **product2 / mrcirhdr**: Linked via `compcode` and `lotno` for end-to-end material history (WIP tracking). ---