mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-22 22:35:43 +00:00
fix monitorin saldo without sales order;format date excel po
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user