const fs = require('fs');

let js = fs.readFileSync('vouchers_returns.js', 'utf8');

js = js.replace(/purchases-returns-items-tbody/g, 'purchases-returns-lines-tbody');

fs.writeFileSync('vouchers_returns.js', js, 'utf8');

let html = fs.readFileSync('index.html', 'utf8');
html = html.replace(/v=\d+/g, 'v=' + Date.now());
fs.writeFileSync('index.html', html, 'utf8');

console.log('Fixed tbody IDs in vouchers_returns.js');
