Merge branch 'fix/BE/US-281-adjustment-recording-egg-mass' into 'development'

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

See merge request mbugroup/lti-api!296
This commit is contained in:
Hafizh A. Y.
2026-02-03 02:33:54 +00:00
7 changed files with 919 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