All tables
tables · table

billagainstwo

The table logs financial and physical adjustments to Job Cards. When a vendor submits a bill for work performed (like machining or forging), the actual quantities accepted might differ from the work order; this table captures those discrepancies and the associated tax breakdown (CGST, SGST, IGST).

Row count
123,701
Last entry
2026-01-16
Source
tables

Columns

23
ColumnTypeNullableMeaning
indexintegerNoPrimary Key
compcodestringYesCompany Code
jobnointegerYesJob Card / Work Order Number
billnostringYesVendor Invoice/Bill Number
billdatedatetimeYesVendor Invoice Date
billamtnumberYesTotal Bill Amount
adjqtynumberYesAdjustment Quantity
mrpnostringYesMaterial Receipt Plan No
auth_flagstringYesAuthorization Status
vendcodestringYesVendor ID
CGST_AmtstringYesCentral GST Amount
SGST_AmtstringYesState GST Amount
IGST_AMTstringYesIntegrated GST Amount
CGST_PerstringYesCGST Percentage
SGST_PerstringYesSGST Percentage
IGST_PerstringYesIGST Percentage
OtherAmtstringYesMiscellaneous Charges
TaxableAmtstringYesBase Taxable Value
Adj_DatestringYesDate of Adjustment
Adj_TimestringYesTime of Adjustment
user_adjstringYesAdjusting User
Reason_adjQtystringYesAdjustment Reason Code
Reason_of_AdjQtystringYesAdjustment Description

Full documentation

The `billagainstwo` table serves as a reconciliation and adjustment ledger for vendor billing against Work Orders (Job Cards) in the SQL Server environment. It tracks specific quantity adjustments (`adjqty`) and GST-related financial metrics for job work executed by external vendors. This table is primarily used in reports for tracking pending job card balances, GST input registers, and vendor ledger reconciliation.
 
 ### 1) Overview
 The table logs financial and physical adjustments to Job Cards. When a vendor submits a bill for work performed (like machining or forging), the actual quantities accepted might differ from the work order; this table captures those discrepancies and the associated tax breakdown (CGST, SGST, IGST).
 
 ### 2) Column Dictionary
 | Column | Type | Nullable | Meaning | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary Key | Internal identifier. |
 | **compcode** | string | Yes | Company Code | Joined with almost all master and transaction tables. |
 | **jobno** | integer | Yes | Job Card / Work Order Number | Core foreign key; joins to `job.jobno` or `jobhdr.jobcardno`. |
 | **billno** | string | Yes | Vendor Invoice/Bill Number | Used for bill tracking and vendor reconciliation. |
 | **billdate** | datetime | Yes | Vendor Invoice Date | Filtering for financial periods. |
 | **billamt** | number | Yes | Total Bill Amount | Financial reporting. |
 | **adjqty** | number | Yes | Adjustment Quantity | Used to calculate final job balances (`pcs` + `rgp` - `recd` - `adjqty`). |
 | **mrpno** | string | Yes | Material Receipt Plan No | Likely tracks the specific receipt entry this adjustment applies to. |
 | **auth_flag** | string | Yes | Authorization Status | 'Y' or 'N' indicating if the adjustment is approved. |
 | **vendcode** | string | Yes | Vendor ID | Joined with `vendmas.vendcode`. |
 | **CGST_Amt** | string | Yes | Central GST Amount | Tax input tracking. |
 | **SGST_Amt** | string | Yes | State GST Amount | Tax input tracking. |
 | **IGST_AMT** | string | Yes | Integrated GST Amount | Tax input tracking. |
 | **CGST_Per** | string | Yes | CGST Percentage | Tax rate validation. |
 | **SGST_Per** | string | Yes | SGST Percentage | Tax rate validation. |
 | **IGST_Per** | string | Yes | IGST Percentage | Tax rate validation. |
 | **OtherAmt** | string | Yes | Miscellaneous Charges | Additional bill costs. |
 | **TaxableAmt** | string | Yes | Base Taxable Value | Used to derive GST inputs. |
 | **Adj_Date** | string | Yes | Date of Adjustment | Metadata for the audit trail. |
 | **Adj_Time** | string | Yes | Time of Adjustment | Metadata for the audit trail. |
 | **user_adj** | string | Yes | Adjusting User | Tracking the operator who performed the adjustment. |
 | **Reason_adjQty** | string | Yes | Adjustment Reason Code | Justification for quantity changes. |
 | **Reason_of_AdjQty** | string | Yes | Adjustment Description | Detailed textual reason for the change. |
 
 ### 3) Relationships & Join Map
 
 Based on `SCHEMA_MAP` and the logic found in the referencing stored procedures, the primary joins are:
 
 * **Job Cards (2nd Operation):** `billagainstwo.jobno` joins to `dbo.job (jobno)` and `dbo.job (compcode)`.
 * **Job Cards (1st Operation/Header):** `billagainstwo.jobno` joins to `dbo.jobhdr (jobcardno)` and `dbo.jobhdr (compcode)`.
 * **Raw Material Job Headers:** `billagainstwo.jobno` joins to `dbo.rmjobhdr (jobcardno)` and `dbo.rmjobhdr (compcode)`.
 * **Vendor Master:** `billagainstwo.vendcode` joins to `dbo.vendmas (vendcode)` and `dbo.vendmas (compcode)`.
 * **Material Receipt Adjustments:** `billagainstwo.jobno` joins to `dbo.rmmrphdr (jobcardno)` to track weight loss or issued weight discrepancies.