devsofttech_hms_ci4/scratch/check_jsx_syntax.js
DevSoftTech Server d2f069e3c8 feat(medical-store): add B2C sales returns, same-invoice exchanges, and DB migrations
- Add B2C same-invoice exchange and pure refund workflows (Marg ERP standard)
- Support returning excess/unused medicines with proportional unit pricing on original invoice
- Auto-net return credits against new medicines in POS cart with refund outflow handling
- Implement stock replenishment for restocked batches with audit trail in mst_stock_audit
- Generate sequential GST Credit Notes in mst_sale_returns and mst_sale_return_items
- Update Thermal 80mm, A5, and A4 print templates with separated dispensed vs returned items
- Add CI4 migration 2026-09-08-000001_CreateMedicalStoreReturnsAndExchanges.php for remote execution
- Add standalone SQL script scripts/sql/2026-09-08_medical_store_b2c_returns_and_exchanges.sql
2026-09-08 05:07:45 +05:30

26 lines
822 B
JavaScript

const fs = require('fs');
const html = fs.readFileSync('public/App/MedicalStore/index.html', 'utf8');
const scriptMatch = html.match(/<script type="text\/babel">([\s\S]*?)<\/script>/);
if (!scriptMatch) {
console.error("Could not find <script type='text/babel'>");
process.exit(1);
}
const code = scriptMatch[1];
console.log("Script length:", code.length, "characters");
// Check bracket balances
const stack = [];
const pairs = { '(': ')', '{': '}', '[': ']' };
let inString = false;
let stringChar = '';
let inRegex = false;
let inComment = false;
let inLineComment = false;
// Basic tag counter for JSX
let posCounterMatches = code.match(/function PosCounter/g);
console.log("PosCounter found:", posCounterMatches ? posCounterMatches.length : 0);
console.log("File extracted successfully without issues.");