# Inquiry

**Kind:** Class

**Source:** `Pams/Logic/Pams.Business/BindingModels/Sales/InquiryBindingModel.cs` (line 12)

**Part of:** [Pams](subsystem-pams)

`Inquiry` is a C# binding model for transferring sales inquiry data between application layers. It groups inquiry identifiers, job references, dates, status, client details, and branch information for sales-related requests.

## Diagram

```mermaid
graph LR
    Inquiry[Inquiry]
    Inquiry --> Identity[InquiryNumber]
    Inquiry --> Status[CurrentJobStatusID]
    Inquiry --> Branch[CompanyBranchID]
    Inquiry --> References[JobNo / FileNo]
    Inquiry --> Dates[InquiryDate / BidDueDate]
    Inquiry --> Details[InquiryType / ClientName / EndUser]
```

## Usage

```ts
type Inquiry = {
  inquiryNumber: number;
  currentJobStatusID: number | null;
  companyBranchID: number | null;
  jobNo: string;
  fileNo: string;
  inquiryDate: string | null;
  inquiryType: string;
  bidDueDate: string | null;
  clientName: string;
  endUser: string;
};

const inquiry: Inquiry = {
  inquiryNumber: 0,
  currentJobStatusID: null,
  companyBranchID: null,
  jobNo: "JOB-001",
  fileNo: "FILE-001",
  inquiryDate: new Date().toISOString(),
  inquiryType: "Bid",
  bidDueDate: null,
  clientName: "Client Name",
  endUser: "End User",
};

await fetch("/api/sales/inquiries", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(inquiry),
});
```

## AI Coding Instructions

- Keep property names aligned with the `Inquiry` binding model when mapping API request and response payloads.
- Preserve nullable handling for `CurrentJobStatusID`, `CompanyBranchID`, `InquiryDate`, and `BidDueDate`.
- Serialize `DateTime?` values as ISO date strings or `null` in JavaScript clients.
- Do not treat `InquiryNumber` as a JavaScript string when the API expects a numeric value.

## Relationships

- IMPORTS → `JobProcess`
- IMPORTS → `JobProcessBindingModel`
- IMPORTS → `JobVersion`
- IMPORTS → `JobVersionBindingModel`
- IMPORTS → `JobGuarantees`
- IMPORTS → `JobGuaranteesBindingModel`
- IMPORTS → `CommentsView`
- IMPORTS → `InquiryType`
- IMPORTS → `OrderChance`
- IMPORTS → `OrderStatus`
- IMPORTS → `OfferStatus`
- IMPORTS → `Project`
- IMPORTS → `ProductType`
- IMPORTS → `PaymentMethod`
- IMPORTS → `DeliveryTerm`
- IMPORTS → `CategoryType`
- IMPORTS → `Category`

## Used by

13 references from 13 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (13)

- `CanceledController` — `Pams/API/Pams.API/Controllers/Sales/CanceledController.cs`:26
- `DeliveredController` — `Pams/API/Pams.API/Controllers/Sales/DeliveredController.cs`:26
- `InquiryController` — `Pams/API/Pams.API/Controllers/Sales/InquiryController.cs`:48
- `JobCommentController` — `Pams/API/Pams.API/Controllers/Sales/JobCommentController.cs`:21
- `JobDocumentController` — `Pams/API/Pams.API/Controllers/Sales/JobDocumentController.cs`:19
- `JobProcessController` — `Pams/API/Pams.API/Controllers/Sales/JobProcessController.cs`:19
- `OfferController` — `Pams/API/Pams.API/Controllers/Sales/OfferController.cs`:23
- `OrderController` — `Pams/API/Pams.API/Controllers/Sales/OrderController.cs`:23

…and 5 more.
