425 Commits

Author SHA1 Message Date
f2d4558b80 Make dashboard/home link role-aware: counter -> inventory, cashier -> POS
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 19:57:01 +00:00
c374cccd77 Set default landing page for counter role to Inventory
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 17:44:00 +00:00
a4f90cd4a3 Remove Cobrar button from Notas de Remision list
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 17:25:24 +00:00
667cd3b1eb Fix ticket print not opening (variable order) and add error handling
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 17:14:13 +00:00
ee5075ea2e Increase ticket font sizes and render at real printable width
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 17:10:33 +00:00
4363829c26 Lower ticket virtual print resolution for testing
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 16:44:12 +00:00
95a01c8958 Improve ticket legibility: larger fonts, spacing, indentation and thermal emphasized mode
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 16:22:26 +00:00
8e6c1f2887 Add ticket paper width selector and improve thermal cut/print layout
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 09:22:58 +00:00
f0c605f911 Fix: only sync ML stock when both marketplace_listings and meli_sync_queue exist
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 04:50:01 +00:00
4a4e53602b Guard against missing marketplace tables when recording inventory operations
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-18 04:47:46 +00:00
6d07eab5c0 Add workshop module toggle in Modules & Integrations settings
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-16 08:13:56 +00:00
c90012ca37 Add allow_negative_stock toggle for sales, remissions, quotes, layaways and service orders
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-15 18:02:43 +00:00
116d4452da Add allow_zero_price_sales toggle: config UI, POS enforcement and backend validation
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-15 17:50:02 +00:00
2734a484f6 Add script to clone inventory between tenant DBs
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-15 17:41:26 +00:00
1cce81b75f Facturapi: fix legal payload (name/legal_name/tax_system, address, no tax_id), reuse local org, status via user key; add fiscal address fields; embed Carta Manifiesto iframe
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-13 06:35:36 +00:00
b2f23ef3cf fix(facturapi): configure legal data after org creation/reuse to enable Live mode
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-09 07:25:07 +00:00
9b88b8ba4c chore(systemd): add FACTURAPI_USER_KEY to nexus-pos.service
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-08 08:07:46 +00:00
fa992b7a4a fix(invoicing): return clear error on Facturapi config issues instead of 500
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-08 07:18:50 +00:00
a8e748e08f fix(invoicing): wire emisor config save/load and align fiscal config keys
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-06 23:49:23 +00:00
07dad0801e fix(sw): bump SW version to 41; fix page guard fallback to avoid loops
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-03 08:27:11 +00:00
0bd5ee8ee8 fix(permissions): honor module permissions for cashier/counter in sidebar and page guard
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-03 08:10:22 +00:00
e270e848d7 fix(config): use cfg-tab-btn style for permissions tabs
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-03 08:05:27 +00:00
6e85497e42 feat(permissions): granular module permissions + workshop permissions matrix
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-03 07:55:17 +00:00
4718a09f15 fix(inventory): use category_id in bulk import and resolve category names
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 23:19:33 +00:00
1ff4d80277 fix(pos): print tickets via iframe with measured height and configurable paper width
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 23:11:55 +00:00
31b533f9f9 fix(inventory): support cp1252/latin-1 CSV encodings in bulk import
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 22:49:39 +00:00
982315bdaf feat(permissions): add dashboard.view permission for cashier/counter/workshop
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 22:37:28 +00:00
1b51fe65b5 fix(pos): hide Sistema button for non-admin roles and allow login/logout in page guard
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 22:27:50 +00:00
302d54eb0a fix(config): re-sync employee permissions on role change; add sync script
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 19:37:19 +00:00
53ec0cc3e5 fix(inventory): read refreshed token dynamically in inventory.js
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 19:27:22 +00:00
944b9b51b3 fix(customers): allow cashiers to view customers and use refreshed token
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 14:49:47 +00:00
670db75fcd fix(workshop): show autorizada for workshop/mechanic and hide delivery statuses
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 14:45:25 +00:00
c226b1cf77 fix(workshop): restrict workshop/mechanic views to only 'autorizada' status
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
2026-07-02 14:38:29 +00:00
f42910f4f6 feat: cashier/counter reports, service-order & remission flows, Rached migration utils
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Add "Mis cortes de caja" report for cashiers/counters with sales detail.
- Cash register history scoped to own cuts for non-admin roles; new /register/<id>/sales endpoint.
- Remove dashboard from cashier menu; add Reports to cashier/counter.
- Service orders: assign mechanic, budget field, invoice flag, counter/cashier can add items/remissions, convert to remission.
- Remission notes module (UI, CSS, courier, counter remissions).
- Customer hard-delete and vehicle/customer linkage in workshop.
- POS: always show search results, compact payment grid, credit validation, tier pricing (5%/10%), ticket with customer/folio.
- Inventory: CSV template with sku_secondary, alias import.
- Rached migration scripts and DB migrations.
- Version-bump cached JS/CSS query strings.

Excludes local Rached session tokens/captures (rached_*.json / rached_*.txt).
2026-07-02 12:51:56 +00:00
483498cfcc fix: define global toast utility in app-init
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Added window.toast() in app-init.js so workshop/customers/inventory pages can use it.

- Bumped app-init.js cache version on all templates.
2026-06-30 20:13:32 +00:00
7dc34f68ab feat(workshop): make brand/model required, plate optional, remove VIN
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- create_vehicle endpoints now require make and model; plate is optional; VIN is no longer stored.

- Updated new-vehicle modal: removed VIN field, plate is optional, brand/model marked required.
2026-06-30 20:08:56 +00:00
73553a3771 feat(customers): hard-delete customers
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
DELETE /customers/<id> now removes the row.

- Deletes layaways and dependent items/payments.

- Nullifies customer_id in sales, service_orders, fleet_vehicles, plate_vehicles, quotations, returns, warranties, bnpl_transactions, customer_payments.

- Cascade-delete CRM tables are handled by FK constraints.
2026-06-30 20:04:11 +00:00
073c97406b feat(customers): show vehicles and delete customer
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- get_customer now returns fleet_vehicles assigned to the customer.

- Added DELETE /pos/api/customers/<id> soft-delete (is_active=false) with customers.delete permission.

- Added Vehicles section in customer detail panel.

- Added Eliminar button in quick actions (owner/admin/customers.delete).
2026-06-30 19:58:45 +00:00
66b8fe3d69 feat(workshop): vehicles must be assigned to a customer
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Added customer_id column to fleet_vehicles with FK to customers.

- Enforced customer_id on create_vehicle endpoints (workshop and fleet).

- New vehicle modal now requires a selected customer and stores customer_id.

- Migration v4.13 applied to all tenants.
2026-06-30 19:53:00 +00:00
1af66cb302 fix(workshop): ensure new-customer/new-vehicle modals open on top
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Raised z-index of newCustomerModal and newVehicleModal so they appear above the order modal.

- Added '+ Nuevo' customer button in the edit-order modal as well.
2026-06-30 19:49:42 +00:00
5c700e98c3 feat(workshop): add new customer from new order modal
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Added POST /pos/api/service-orders/customers endpoint for workshop.edit users.

- Added 'Nuevo cliente' modal reachable from the new service order form.

- After creation the customer is automatically selected in the order.
2026-06-30 19:45:41 +00:00
603046cb09 feat(inventory): edit items in inventory grid
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Added 'Editar' button in inventory rows.

- Reused create modal as create/edit with pre-filled data.

- Added fields: unit, max_stock, tax_rate, description, is_active.

- Added /inventory/categories/all endpoint for flat category selector.

- Price/cost inputs are disabled for users without config.edit_prices.
2026-06-30 19:43:03 +00:00
b6679c6d9c feat(workshop): add vehicle from new order modal too
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
The '+ Nuevo' vehicle button is now available in both the edit and new service order modals.
2026-06-30 19:36:05 +00:00
52cb01eb4e feat(workshop): add vehicle from service order
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Added POST /pos/api/service-orders/vehicles endpoint for workshop.edit users.

- Added 'Nuevo vehiculo' modal in edit order with plate, VIN, make, model, year, color and owner.

- After creation the vehicle is automatically selected in the order.
2026-06-30 19:33:07 +00:00
ff600ed7df feat(workshop): remove quality_check and add edit order modal
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Removed 'Control de calidad' from service order pipeline (VALID_TRANSITIONS, status labels, Kanban columns).

- Added editable fields for customer, vehicle, branch, mechanic, priority, mileage, fuel level, estimated completion/cost and reception notes.

- Added customer/vehicle autocomplete in the edit order modal.
2026-06-30 19:30:51 +00:00
b539c92daf feat(i18n): force Spanish as the only language across all tenants
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- i18n.js now locks currentLang to 'es' and overwrites pos_lang in localStorage.

- Disabled setLang language switching.

- Removed ES/EN toggle from sidebar.

- Bumped i18n.js and sidebar.js cache version on all templates.
2026-06-30 18:13:43 +00:00
37b7f94f54 fix(config): saveAll crash when saving modules
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
saveModules() used event.target, which is undefined when called from saveAll.

Replaced with direct checkbox lookups and null checks.
2026-06-30 18:04:22 +00:00
7852838b21 feat(config): hard-delete branches for admins
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
DELETE /branches/<id> now removes the row, nullifies FK references, and deletes branch-specific stock/count records.

Main branch remains protected.
2026-06-30 18:00:26 +00:00
7e3205b03a feat(config): allow admin/owner to delete branches
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Added DELETE /pos/api/config/branches/<id> that soft-deletes the branch (is_active=false).

- Restricted to owner/admin; main branch cannot be deleted.

- Added 'Eliminar' button in the branches grid for admin/owner.
2026-06-30 17:57:29 +00:00
e9cfb2e756 feat(workshop): allow admin/owner to delete service orders
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled
- Soft-delete service orders via is_deleted flag.

- Added DELETE /pos/api/service-orders/<id> restricted to owner/admin.

- Updated list, detail, summary, status and assignment queries to exclude deleted orders.

- Added 'Eliminar orden' button in the detail modal for administrators.
2026-06-30 17:51:09 +00:00