fix monitorin saldo without sales order;format date excel po

This commit is contained in:
giovanni
2026-05-22 19:40:05 +07:00
parent 7bbb6a836c
commit c676aed371
2 changed files with 25 additions and 7 deletions
@@ -435,6 +435,21 @@ func formatPurchaseExportEntityStatus(purchase *entity.Purchase) string {
return safePurchaseExportText(purchase.LatestApproval.StepName)
}
var purchaseIndonesianMonths = map[time.Month]string{
time.January: "Jan",
time.February: "Feb",
time.March: "Mar",
time.April: "Apr",
time.May: "Mei",
time.June: "Jun",
time.July: "Jul",
time.August: "Ags",
time.September: "Sep",
time.October: "Okt",
time.November: "Nov",
time.December: "Des",
}
func formatPurchaseExportDate(value *time.Time) string {
if value == nil || value.IsZero() {
return "-"
@@ -446,7 +461,8 @@ func formatPurchaseExportDate(value *time.Time) string {
t = t.In(location)
}
return t.Format("02-01-2006")
month := purchaseIndonesianMonths[t.Month()]
return fmt.Sprintf("%d-%s-%02d", t.Day(), month, t.Year()%100)
}
func safePurchaseExportPointerText(value *string) string {