The Products module keeps your full catalog — pricing tiers, VAT classifications, and default discount structures — in sync between MySQL and the Products sheet. Every invoice line item draws from this catalog, inheriting the product’s cost, wholesale price, and discount rules unless an invoice- or customer-level override is in place. Getting your product data right here saves time across every document you create downstream.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/arsinousltd-sudo/Arsinous-V8-Sales/llms.txt
Use this file to discover all available pages before exploring further.
The Products Sheet
Each row in the Products sheet represents one product record from the MySQLproducts table. After a sync, column K is stamped with an Updated: timestamp so you always know when the data was last refreshed.
| Column | MySQL field | Type | Description |
|---|---|---|---|
| A | id | integer | Auto-increment primary key |
| B | code | string | Short product code |
| C | name | string | Full product description |
| D | cat | string | Category |
| E | vat_code | integer | VAT code (1, 2, or 3) |
| F | cost | decimal | Default cost price (€) |
| G | price | decimal | Wholesale / list price (€) |
| H | retail | decimal | Retail price (€) |
| I | def_discount | string | Default quantity-break discount rule |
| J | def_fixed_discount | string | Default flat discount percentage |
| K | (generated) | — | “Updated:” label |
| L | (generated) | — | Sync timestamp |
VAT Codes
VAT rates are defined in theVat constant in Constants.gs and are used throughout the invoice calculation engine:
| Code | Rate | Description |
|---|---|---|
1 | 0 % | Zero-rated / exempt |
2 | 5 % | Reduced rate |
3 | 19 % | Standard rate (default for new products) |
Syncing Products from MySQL
updateProducts(conn) refreshes the Products sheet from the products table:
- Reads the header row to build the column key list.
- Clears
A2:M(preserving headers). - Executes
SELECT * FROM productsover JDBC. - Maps each result column to the matching sheet column by header name.
- Writes all rows in a single
setValuescall. - Stamps the Updated: timestamp into cells K1:L1.
Adding a New Product
Open the Add Product dialog from Arsinous menu → Add Product or the sidebar Add button. This callsshowProduct(null), which opens a 600 × 600 px Vue.js/Buefy modal pre-filled with DefaultProduct defaults:
saveProductToDb(data), which executes an INSERT INTO products statement with fields: code, name, cat, vat_code, price, retail, def_discount, def_fixed_discount. Note that cost is not included in the INSERT — it must be set via an UPDATE after creation if needed. When editing an existing product, cost is included in the UPDATE products SET statement.
Editing an Existing Product
Products can be edited from both the Products sheet and the Inventory sheet:- Click any cell in the product’s row on either sheet.
- Choose Arsinous menu → Edit Product. This calls
editProduct(). editProduct()validates that the active sheet isProductsorInventory, reads the header row (skipping the title row viasplice(1,1)), builds aproductDataobject keyed by column header, and callsshowProduct(productData).- The modal opens in edit mode, fetches the full record from MySQL via
getProductFromDB(id), and populates all fields. - Make your changes and click Save.
saveProductToDb(data)runs anUPDATE products SET ...statement.
Product Fields Reference
Short product identifier shown on invoice line items and reports.
Full product description. Displayed in invoice autocomplete and the inventory grid.
Category label for grouping and filtering products.
VAT classification:
1 = 0%, 2 = 5%, 3 = 19%. The VAT rate is applied per line item when calculating invoice totals.Default cost price in euros. Used as a fallback when no lot-level
final_cost is available for invoice cost tracking.Wholesale / list price in euros. This is the default unit price populated when the product is added to an invoice.
Retail price in euros. Written into the invoice spreadsheet for reference; not used in totals calculations.
Default quantity-break discount rule for this product. Applied to all customers unless overridden at the customer or invoice level. See the format note below.
Default flat discount percentage. Applied as a fallback when no quantity-break rule matches, unless overridden per customer.