devsofttech_hms_ci4/scratch/inspect_sales_schema.php
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

8 lines
293 B
PHP

<?php
$db = new mysqli('localhost', 'root', '', 'hms_data_ci4');
$res = $db->query("SELECT head_id, head_code, head_name, head_type FROM mst_account_heads");
while($r = $res->fetch_assoc()) {
echo $r['head_code'] . " | " . $r['head_name'] . " (" . $r['head_type'] . ")\n";
}
$db->close();