[FEAT/BE] fix bug recording and closing counting sapronak

This commit is contained in:
ragilap
2026-02-02 14:08:29 +07:00
parent 75b822eb19
commit 760b37449e
7 changed files with 917 additions and 806 deletions
@@ -234,14 +234,14 @@ func ToSapronakProjectAggregatedFromReport(report *SapronakReportDTO, flag strin
row.Notes = "TRANSFER STOCK"
}
}
case "pemakaian", "adjustment keluar":
case "pemakaian":
price := row.UnitPrice
if price == 0 {
price = item.Harga
}
row.QtyUsed += item.QtyKeluar
row.TotalAmount += item.QtyKeluar * price
case "mutasi keluar", "penjualan":
case "adjustment keluar", "mutasi keluar", "penjualan":
price := row.UnitPrice
if price == 0 {
price = item.Harga