View Categories

Quotations

3 min read

Overview #

The Quotations module streamlines the management of price quotations issued to customers, allowing users to create, view, edit, and delete quotation records. It tracks key details such as customer, project, quotation date, status, and financial totals (excluding and including VAT). The module also supports managing quotation items, capturing quantities, costs, and VAT percentages for accurate pricing and financial tracking. It integrates with customer and project data to ensure efficient sales and quoting workflows within the software using Delphi, DevExpress, and PgDAC, with the TcxGridDBTableView for data display.

Navigate to the Quotations Module #

  1. From the main application interface, locate the Tile Menu.
  2. Click on the Quotations tile to open the module.

How to Filter and View Quotations #

  1. In the Quotations module, click the Open button on the main list view.
    • This refreshes the quotation list, displaying all records based on the transaction type (transTypeId2=6).
    • The TcxGridDBTableView grid displays columns such as Status, Project, Customer, Reference, Date, User, Total (Exc), Total (VAT), and Total (Inc).
    • Use the grid’s built-in filtering and sorting options to refine the view (e.g., filter by Status or Date).

How to Create a Quotation #

  1. In the main list view, click the New button.
  2. The interface switches to the Edit view, where you can fill in the following fields:
    • Status: Select from Pending, Active, Complete, or Cancelled using the TcxDBImageComboBox.
    • Customer: Choose a customer from the dropdown list (populated via qryContactsLu, filtered for customer contacts when transTypeId2=6).
    • Project: Select a project from the dropdown list (populated via qryProjectsLu).
    • Reference: Enter a unique reference for the quotation (e.g., quotation number).
    • Date: Set the quotation date using the TcxDBDateEdit date picker.
    • Note: Add any additional notes or comments in the TcxDBMemo (optional).
  3. Click Save to create the quotation, triggering qryTransaction.Post and qryUpdateTotals.ExecSQL to update totals.

How to Edit a Quotation #

  1. In the main list view, double-click a quotation row in the viwTransactions TcxGridDBTableView or right-click and select Edit from the context menu (pmTransactionList).
  2. The Edit view (tsEdit) opens, allowing you to modify fields (Status, Customer, Project, Reference, Date, Note).
  3. Click Save to update the quotation, which posts changes via qryTransaction and updates totals.

How to Add a Quotation Item #

  1. In the Edit view of a quotation, locate the Transaction Items grid (viwTransactionItems) at the bottom.
  2. Click the Add Item button (btnAddItems) to open the lookup form (frmLookupTrans).
    • A modal window appears, allowing you to select items to add, linked to the project (qryTransaction.FieldByName(‘project_id’)).
    • Alternatively, click the Custom button (btnCustom) to manually append a new item row to the TcxGridDBTableView.
  3. Fill in the following fields for the new item in the grid:
    • Description: Enter the item description (TStringField).
    • Quantity: Specify the quantity (TFloatField).
    • Unit: Define the unit of measure (e.g., kg, units, meters) (TStringField).
    • Unit Cost: Enter the cost per unit excluding VAT (TFloatField).
    • VAT %: Specify the VAT percentage (TFloatField, if applicable).
    • Note: Add item-specific notes in the TMemoField (optional).
  4. The system automatically calculates:
    • Total (Exc): Quantity × Unit Cost.
    • Total (VAT): VAT amount based on the VAT percentage.
    • Total (Inc): Total including VAT.
  5. Click Save to save the item (qryTransactionItems.Post) and update the quotation totals via qryUpdateTotals.

How to Delete a Quotation #

  1. In the main list view, right-click on the quotation in the viwTransactions grid.
  2. Select Delete from the context menu (miDelete in pmTransactionList).
  3. Confirm the deletion when prompted in the MessageDlg.
    • Note: If the quotation cannot be deleted due to database constraints (e.g., foreign key issues), an error message will appear, handled in miDeleteClick.

How to Delete a Quotation Item #

  1. In the Edit view, locate the Transaction Items grid (viwTransactionItems).
  2. Right-click on the item row you want to delete.
  3. Select Delete from the context menu (dxBarButton1 in pmMenuEdit).
  4. Confirm the deletion when prompted.
    • Note: If the item cannot be deleted, an error message is displayed via dxBarButton1Click.

Change Grid Layout #

  1. In the main list view, select the edge of a column header in the viwTransactions TcxGridDBTableView.
  2. Drag the column to reposition it or adjust its width as desired.
  3. To save the customized layout:
    • Click the Menu button (btnMenuList) in the main list view.
    • Select Save Grid Layout (miSaveGridListClick) from the dropdown (pmMenuList).
  4. To restore the default grid layout:
    • Click the Menu button.
    • Select Restore Grid Layout (miRestoreGridListClick).

Notes #

  • The Quotations module uses a transaction type filter (transTypeId2=6) to display quotation records. Ensure the correct transaction type is set when accessing the module.
  • Totals (Total Exc, Total VAT, Total Inc) are automatically updated when items are added or modified using the stored procedure (qryUpdateTotals).
  • The Customer dropdown is filtered to show customer contacts (via qryContactsLu, where contact_type_id=1 for transTypeId2=6).
  • The module integrates with the main application’s user (frmMain.user_id) and project data (qryProjectsLu) for seamless operation.
  • Use the Copy to options (e.g., miCopyToSalesOrder) in the context menu (pmCopyMenu) to duplicate quotations to other transaction types, handled by qryCopyTransaction.

Leave a Comment