feat: implement dispensing module with transaction-safe stock management, FEFO allocation, and H1 compliance reporting
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
const { Pool } = require('pg');
|
||||
const pool = new Pool({ connectionString: 'postgres://postgres:csh%402018@localhost:5432/ai_pharmacy' });
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
await pool.query("UPDATE stock_movements SET reason_code = 'system_recovery', notes = 'Recovered past adjustment' WHERE movement_type = 'adjustment' AND notes IS NULL");
|
||||
console.log('Successfully updated old adjustments!');
|
||||
} catch(err) {
|
||||
console.error(err);
|
||||
} finally {
|
||||
pool.end();
|
||||
}
|
||||
}
|
||||
run();
|
||||
Reference in New Issue
Block a user