The Customers module is the foundation of Arsinous V8 Sales — every invoice, payment, and discount is anchored to a customer record. Customer data lives in your MySQLDocumentation 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.
customers table and is synced on demand into the Customers sheet, where each row also carries a hyperlink directly to that customer’s Google Drive folder. This tight integration between your database, your spreadsheet, and Drive means all sales documents, PDfs, and correspondence stay organised alongside the structured data that drives your reporting.
The Customers Sheet
The Customers sheet contains one customer per row. Columns are mapped automatically from MySQL column names, so the sheet header row must match the database field names exactly.| Column | MySQL field | Description |
|---|---|---|
| A | id | Auto-increment primary key |
| B | code | Short customer code (format: NN-NN LLL) |
| C | name | Full customer name |
| D | address | Street address (multi-line) |
| E | municipality | Municipality / district |
| F | city | City |
| G | zip | Postal code |
| H | phone | Phone number(s) |
| I | details | Free-text notes and additional details |
| J | folder | Google Drive folder ID |
| K | (generated) | Clickable Drive folder hyperlink — written to the second-to-last column (lastCol - 1) |
The Customers sheet must exist with these exact column headers in row 1 before running
updateCustomers. The sync function maps MySQL column names to sheet headers by name — any mismatch will leave that column blank.Syncing Customers from MySQL
updateCustomers(conn) pulls the full customer list from MySQL and refreshes the sheet in one operation:
- Clears the data range
A2:M(preserving the header row). - Opens a JDBC connection and executes
SELECT * FROM customers. - Maps each result column to the matching sheet header by name.
- Writes all rows in a single
setValuescall. - Generates a
HYPERLINKformula for each row’s Drive folder column using the storedfolderID.
Adding a New Customer
Open the Add Customer dialog
Click Add in the Arsinous sidebar, or navigate to Arsinous menu → Add Customer. This calls
showCustomer() with no arguments, so the form opens pre-filled with DefaultCustomer defaults (all fields null).Fill in the customer details
The modal dialog (600 × 650 px, built with Vue.js and Buefy) presents the following fields:
- Code — required; must match the format
NN-NN LLL(validated before save) - Name — required
- Address — multi-line text area
- Municipality and City — side by side
- Postal Code and Phone — side by side
- Details — free-text notes (5-row text area)
Save the record
Click Save. The dialog calls
saveCustomerToDb(data) via google.script.run. Because data.folder is not set for a new customer, the backend automatically creates a new Google Drive subfolder under CUSTOMERS_FOLDER and stores the resulting folder ID in the folder column.Editing an Existing Customer
- Navigate to the Customers sheet and click any cell in the target customer’s row.
- Go to Arsinous menu → Edit Customer (or click Edit in the sidebar). This calls
editCustomer(). editCustomer()reads the header row to build a key list, setscustomerData.idfrom column A of the selected row, then callsshowCustomer(customerData).- The modal opens in edit mode (
loading: true), immediately fetches the full record from MySQL viagetItemsFromDB(id, "customers", "id"), and populates all fields. - Make your changes, then click Save.
saveCustomerToDb(data)runs anUPDATE customers SET ...statement for the existing record.
Navigating to a Customer’s Drive Folder
Select any row in the Customers sheet, then choose Arsinous menu → Open Customer Folder. This callsnavigateToCustomersFolder(), which reads the folder column value for the selected row and opens https://drive.google.com/drive/folders/<folder_id> in a new browser tab via navigateTo().
Customer Fields Reference
Short alphanumeric customer code. Must follow the
NN-NN LLL format (validated in the modal before saving). Used as a reference on invoices and reports.Full customer name. Displayed in invoice autocomplete dropdowns and the Balance sheet.
Street address. Supports multi-line input.
Municipality or administrative district.
City name.
Postal / ZIP code.
Phone number or numbers. Free-text — no format enforcement.
Free-text field for any additional notes, tax numbers, or contact details. Displayed in the invoice spreadsheet header area.
Google Drive folder ID. Set automatically on first save if not provided. The Customers sheet uses this to generate the clickable Link to folder hyperlink and to place invoice shortcuts inside the correct folder.