feat: cashier/counter reports, service-order & remission flows, Rached migration utils
- 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).
This commit is contained in:
31
scripts/test_inventory_entrada.js
Normal file
31
scripts/test_inventory_entrada.js
Normal file
@@ -0,0 +1,31 @@
|
||||
const { chromium } = require('playwright');
|
||||
|
||||
(async () => {
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const context = await browser.newContext({ baseURL: 'http://localhost:5001', serviceWorkers: 'block' });
|
||||
const page = await context.newPage();
|
||||
const errors = [];
|
||||
page.on('pageerror', e => errors.push('PAGE: ' + e.message));
|
||||
page.on('console', msg => { if (msg.type() === 'error') errors.push('CONSOLE: ' + msg.text()); });
|
||||
page.on('response', res => { if (res.status() >= 400) errors.push(`HTTP ${res.status()}: ${res.url()}`); });
|
||||
|
||||
await page.goto('/pos/login2?tenant=31');
|
||||
await page.waitForSelector('.user-avatar-btn', { timeout: 10000 });
|
||||
await page.click('.user-avatar-btn[data-id="1"]');
|
||||
for (const digit of '1234') await page.click(`.pin-key[data-digit="${digit}"]`);
|
||||
await page.click('#btn-login');
|
||||
await page.waitForURL('**/pos/catalog', { timeout: 10000 });
|
||||
await page.goto('/pos/inventory');
|
||||
await page.waitForTimeout(1500);
|
||||
await page.click('button:has-text("Entradas")');
|
||||
await page.waitForTimeout(500);
|
||||
await page.click('button:has-text("Nueva Entrada")');
|
||||
await page.waitForTimeout(500);
|
||||
await page.fill('#purchaseItemSearch', 'CVBT2170');
|
||||
await page.waitForTimeout(800);
|
||||
await page.screenshot({ path: '/home/Autopartes/data/rached_import/inventory_entrada_alias.png', fullPage: true });
|
||||
|
||||
console.log('Errors:', errors.length);
|
||||
errors.forEach(e => console.log(' -', e));
|
||||
await browser.close();
|
||||
})();
|
||||
Reference in New Issue
Block a user