add tab keuangan table
This commit is contained in:
124
handlers/corporate/mcudetail/tabkeuangan.handlers.go
Normal file
124
handlers/corporate/mcudetail/tabkeuangan.handlers.go
Normal file
@@ -0,0 +1,124 @@
|
||||
package mcu_corporate_handlers
|
||||
|
||||
import (
|
||||
"cpone/component/pagination"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
"strconv"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type TabKeuanganServices interface {
|
||||
GetTotalOrderKeuangan(mcuID string) (float64, error)
|
||||
GetTotalCardData(mcuID string) (models.TotalBillCard, error)
|
||||
GetListingDataKeuangan(mcuID string, currentpage int, rowperpage int) ([]models.KeuanganModel, int, error)
|
||||
}
|
||||
|
||||
type TabKeuanganHandler struct {
|
||||
TabKeuanganServices TabKeuanganServices
|
||||
}
|
||||
|
||||
func NewTabKeuanganHandler(tk TabKeuanganServices) *TabKeuanganHandler {
|
||||
return &TabKeuanganHandler{
|
||||
TabKeuanganServices: tk,
|
||||
}
|
||||
}
|
||||
|
||||
func (tk *TabKeuanganHandler) HandleShowTabKeuangan(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
logger.Info("handler keuangan")
|
||||
tableID := utils.GenerateRandomID("tableID")
|
||||
paginationID := utils.GenerateRandomID("paginationID")
|
||||
|
||||
id := c.Param("id")
|
||||
logger.Info("Params", zap.Any("id", id))
|
||||
|
||||
dataTable, totalPage, err := tk.TabKeuanganServices.GetListingDataKeuangan(id, 1, 10)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("error get list data keuangan", zap.Any("error", err))
|
||||
return err
|
||||
}
|
||||
|
||||
tablecompo := corporate_mcudetail.TableKeuangan(dataTable, tableID)
|
||||
|
||||
pagination := pagination.PaginationV3(
|
||||
totalPage,
|
||||
1,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabkeuangan/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent",
|
||||
"#tabdanpagi",
|
||||
"outerHTML", "", "",
|
||||
corporate_mcudetail.BeforeRequestContent(),
|
||||
corporate_mcudetail.AfterRequestContent(),
|
||||
)
|
||||
|
||||
totalOrder, err := tk.TabKeuanganServices.GetTotalOrderKeuangan(id)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("error get total order keuangan", zap.Any("error", err))
|
||||
return err
|
||||
}
|
||||
|
||||
totalBill, err := tk.TabKeuanganServices.GetTotalCardData(id)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("error get total bill keuangan", zap.Any("error", err))
|
||||
return err
|
||||
}
|
||||
|
||||
content := corporate_mcudetail.TabKeuanganScreen(
|
||||
tableID,
|
||||
paginationID,
|
||||
corporate_mcudetail.KeuanganCard(
|
||||
strconv.FormatFloat(totalOrder, 'f', 0, 64),
|
||||
strconv.FormatFloat(totalBill.TotalTagihan, 'f', 0, 64),
|
||||
strconv.FormatFloat(totalBill.TotalPelunasan, 'f', 0, 64),
|
||||
strconv.FormatFloat(totalBill.TotalHutang, 'f', 0, 64),
|
||||
),
|
||||
corporate_mcudetail.TableAndPagination(
|
||||
tablecompo,
|
||||
pagination,
|
||||
),
|
||||
)
|
||||
|
||||
return utils.View(c, content)
|
||||
}
|
||||
|
||||
func (tk *TabKeuanganHandler) HandleChangePage(c echo.Context) error {
|
||||
pageparam := c.QueryParam("page")
|
||||
tableID := c.QueryParam("tableID")
|
||||
paginationID := c.QueryParam("paginationID")
|
||||
|
||||
id := c.Param("id")
|
||||
|
||||
page, err := strconv.Atoi(pageparam)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tableData, totalPage, err := tk.TabKeuanganServices.GetListingDataKeuangan(id, page, 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tablecomp := corporate_mcudetail.TableKeuangan(tableData, tableID)
|
||||
pagination := pagination.PaginationV3(
|
||||
totalPage,
|
||||
page,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabkeuangan/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent",
|
||||
"#tabdanpagi",
|
||||
"outerHTML", "", "",
|
||||
corporate_mcudetail.BeforeRequestContent(),
|
||||
corporate_mcudetail.AfterRequestContent(),
|
||||
)
|
||||
|
||||
tabdanpagi := corporate_mcudetail.TableAndPagination(tablecomp, pagination)
|
||||
return utils.View(c, tabdanpagi)
|
||||
}
|
||||
@@ -131,6 +131,11 @@ func SetupRoutesCorporate(app *echo.Echo, appStore db.AppStore) {
|
||||
corp.GET("/dashboard_pic/detail/:id/tabdaftarpeserta/changepage", daftarpesertaHandl.HandlePagination)
|
||||
corp.GET("/dashboard_pic/detail/:id/tabdaftarpeserta/openreport", daftarpesertaHandl.HandleOpenReportDialog)
|
||||
|
||||
keuanganService := mcu_corporate_services.NewTabKeuanganServices(appStore)
|
||||
keuanganHandler := mcu_corporate_handlers.NewTabKeuanganHandler(keuanganService)
|
||||
corp.GET("/dashboard_pic/detail/:id/tabkeuangan", keuanganHandler.HandleShowTabKeuangan)
|
||||
corp.GET("/dashboard_pic/detail/:id/tabkeuangan/changepage", keuanganHandler.HandleChangePage)
|
||||
|
||||
patienServices := corporate_services.NewPatientServices(appStore)
|
||||
patientHandler := corporate_handlers.NewPatientHandler(patienServices)
|
||||
corp.GET("/dashboard_pat", patientHandler.HandleShowPatient)
|
||||
|
||||
@@ -1,8 +1,34 @@
|
||||
package models
|
||||
|
||||
type KeuanganModel struct {
|
||||
TotalOrder string
|
||||
TotalTagihan string
|
||||
TotalPelunasan string
|
||||
TotalHutang string
|
||||
F_BillID int `db:"F_BillID"`
|
||||
F_BillNo string `db:"F_BillNo"`
|
||||
F_BillCorporateID int `db:"F_BillCorporateID"`
|
||||
F_BillDueDate string `db:"F_BillDueDate"`
|
||||
F_BillTotal float64 `db:"F_BillTotal"`
|
||||
F_BillUnpaid float64 `db:"F_BillUnpaid"`
|
||||
F_BillCreated string `db:"F_BillCreated"`
|
||||
BillPayment []BillPaymentModel
|
||||
TotalBillPayment float64
|
||||
}
|
||||
|
||||
type BillPaymentModel struct {
|
||||
F_BillPaymentID int `db:"F_BillPaymentID"`
|
||||
F_BillPaymentF_BillID int `db:"F_BillPaymentF_BillID"`
|
||||
F_BillPaymentDate string `db:"F_BillPaymentDate"`
|
||||
F_BillPaymentNumber string `db:"F_BillPaymentNumber"`
|
||||
F_BillPaymentAmount float64 `db:"F_BillPaymentAmount"`
|
||||
}
|
||||
|
||||
type TotalOrderHeader struct {
|
||||
T_OrderHeaderID int `db:"T_OrderHeaderID"`
|
||||
T_OrderHeaderCorporateID int `db:"T_OrderHeaderCorporateID"`
|
||||
T_OrderHeaderTotal float64 `db:"T_OrderHeaderTotal"`
|
||||
T_OrderHeaderCreated string `db:"T_OrderHeaderCreated"`
|
||||
}
|
||||
|
||||
type TotalBillCard struct {
|
||||
TotalTagihan float64
|
||||
TotalPelunasan float64
|
||||
TotalHutang float64
|
||||
}
|
||||
|
||||
198
services/corporate/mcudetail/tabkeuangan.services.go
Normal file
198
services/corporate/mcudetail/tabkeuangan.services.go
Normal file
@@ -0,0 +1,198 @@
|
||||
package mcu_corporate_services
|
||||
|
||||
import (
|
||||
"cpone/db"
|
||||
"cpone/models"
|
||||
dbx "cpone/package/database"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type TabKeuanganServices struct {
|
||||
TabKeuanganStore db.AppStore
|
||||
}
|
||||
|
||||
func NewTabKeuanganServices(uStore db.AppStore) *TabKeuanganServices {
|
||||
return &TabKeuanganServices{
|
||||
TabKeuanganStore: uStore,
|
||||
}
|
||||
}
|
||||
|
||||
func (tks *TabKeuanganServices) GetTotalOrderKeuangan(mcuID string) (float64, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var mcu models.DashboardPic
|
||||
ret := 0.00
|
||||
var data []models.TotalOrderHeader
|
||||
|
||||
q := `
|
||||
SELECT
|
||||
Mgm_McuID,
|
||||
Mgm_McuLabel,
|
||||
Mgm_McuCorporateID,
|
||||
Mgm_McuIsActive
|
||||
FROM mgm_mcu
|
||||
WHERE Mgm_McuIsActive = 'Y'
|
||||
AND Mgm_McuID = ?
|
||||
`
|
||||
if err := dbx.Handlex.Get(&mcu, q, mcuID); err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("error get corportate id", zap.Any("mcuID", mcuID))
|
||||
return ret, fmt.Errorf("error get corporate id: %v", err)
|
||||
}
|
||||
|
||||
q = `
|
||||
SELECT
|
||||
T_OrderHeaderID,
|
||||
T_OrderHeaderCorporateID,
|
||||
T_OrderHeaderTotal,
|
||||
T_OrderHeaderCreated
|
||||
FROM t_orderheader
|
||||
WHERE T_OrderHeaderIsActive = 'Y'
|
||||
AND T_OrderHeaderCorporateID = ?
|
||||
`
|
||||
if err := dbx.Handlex.Select(&data, q, mcu.Mgm_McuCorporateID); err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("error get orderheader data by corp id", zap.Any("corpID", mcu.Mgm_McuCorporateID))
|
||||
return ret, fmt.Errorf("error get orderheader data by corp id: %v", err)
|
||||
}
|
||||
|
||||
for _, d := range data {
|
||||
ret = ret + d.T_OrderHeaderTotal
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (tks *TabKeuanganServices) GetTotalCardData(mcuID string) (models.TotalBillCard, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var ret models.TotalBillCard
|
||||
var mcu models.DashboardPic
|
||||
var uang []models.KeuanganModel
|
||||
|
||||
q := `
|
||||
SELECT
|
||||
Mgm_McuID,
|
||||
Mgm_McuLabel,
|
||||
Mgm_McuCorporateID,
|
||||
Mgm_McuIsActive
|
||||
FROM mgm_mcu
|
||||
WHERE Mgm_McuIsActive = 'Y'
|
||||
AND Mgm_McuID = ?
|
||||
`
|
||||
if err := dbx.Handlex.Get(&mcu, q, mcuID); err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("error get corportate id", zap.Any("mcuID", mcuID))
|
||||
return ret, fmt.Errorf("error get corporate id: %v", err)
|
||||
}
|
||||
|
||||
q = `
|
||||
SELECT
|
||||
fb.F_BillID,
|
||||
fb.F_BillNo,
|
||||
fb.F_BillCorporateID,
|
||||
DATE_FORMAT(fb.F_BillDueDate, '%e %M %Y') AS F_BillDueDate,
|
||||
fb.F_BillTotal,
|
||||
fb.F_BillUnpaid,
|
||||
DATE_FORMAT(fb.F_BillCreated, '%e %M %Y') AS F_BillCreated
|
||||
FROM f_bill fb
|
||||
WHERE fb.F_BillIsActive = 'Y'
|
||||
AND fb.F_BillCorporateID = ?
|
||||
`
|
||||
|
||||
if err := dbx.Handlex.Select(&uang, q, mcu.Mgm_McuCorporateID); err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("Error Get List Bill Data", zap.Any("corpID", mcu.Mgm_McuCorporateID))
|
||||
return ret, fmt.Errorf("error query database: %v", err)
|
||||
}
|
||||
|
||||
for _, bill := range uang {
|
||||
ret.TotalTagihan = ret.TotalTagihan + bill.F_BillTotal
|
||||
ret.TotalHutang = ret.TotalHutang + bill.F_BillUnpaid
|
||||
}
|
||||
ret.TotalPelunasan = ret.TotalTagihan - ret.TotalHutang
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (tks *TabKeuanganServices) GetListingDataKeuangan(mcuID string, currentpage int, rowperpage int) ([]models.KeuanganModel, int, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var ret []models.KeuanganModel
|
||||
var totalData int
|
||||
var mcu models.DashboardPic
|
||||
|
||||
q := `
|
||||
SELECT
|
||||
Mgm_McuID,
|
||||
Mgm_McuLabel,
|
||||
Mgm_McuCorporateID,
|
||||
Mgm_McuIsActive
|
||||
FROM mgm_mcu
|
||||
WHERE Mgm_McuIsActive = 'Y'
|
||||
AND Mgm_McuID = ?
|
||||
`
|
||||
if err := dbx.Handlex.Get(&mcu, q, mcuID); err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("error get corportate id", zap.Any("mcuID", mcuID))
|
||||
return ret, 0, fmt.Errorf("error get corporate id: %v", err)
|
||||
}
|
||||
|
||||
offset := (currentpage - 1) * rowperpage
|
||||
querytotal := `
|
||||
SELECT COUNT(*)
|
||||
FROM f_bill
|
||||
WHERE F_BillIsActive = 'Y' AND F_BillCorporateID = ?
|
||||
`
|
||||
if err := dbx.Handlex.Get(&totalData, querytotal, mcu.Mgm_McuCorporateID); err != nil {
|
||||
return nil, 0, fmt.Errorf("error query get total data: %v", err)
|
||||
}
|
||||
|
||||
q = `
|
||||
SELECT
|
||||
fb.F_BillID,
|
||||
fb.F_BillNo,
|
||||
fb.F_BillCorporateID,
|
||||
DATE_FORMAT(fb.F_BillDueDate, '%e %M %Y') AS F_BillDueDate,
|
||||
fb.F_BillTotal,
|
||||
fb.F_BillUnpaid,
|
||||
DATE_FORMAT(fb.F_BillCreated, '%e %M %Y') AS F_BillCreated
|
||||
FROM f_bill fb
|
||||
WHERE fb.F_BillIsActive = 'Y'
|
||||
AND fb.F_BillCorporateID = ?
|
||||
LIMIT ? OFFSET ?
|
||||
`
|
||||
|
||||
if err := dbx.Handlex.Select(&ret, q, mcu.Mgm_McuCorporateID, rowperpage, offset); err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("Error Get List Bill Data", zap.Any("corpID", mcu.Mgm_McuCorporateID))
|
||||
return ret, 0, fmt.Errorf("error query database: %v", err)
|
||||
}
|
||||
|
||||
for idx, data := range ret {
|
||||
var paym []models.BillPaymentModel
|
||||
|
||||
q := `
|
||||
SELECT
|
||||
F_BillPaymentID,
|
||||
F_BillPaymentF_BillID,
|
||||
DATE_FORMAT(F_BillPaymentDate, '%e %M %Y') AS F_BillPaymentDate,
|
||||
F_BillPaymentNumber,
|
||||
F_BillPaymentAmount
|
||||
FROM f_bill_payment
|
||||
WHERE F_BillPaymentIsActive = 'Y'
|
||||
AND F_BillPaymentF_BillID = ?
|
||||
`
|
||||
if err := dbx.Handlex.Select(&paym, q, data.F_BillID); err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("Error Get List Payment Data", zap.Any("billID", data.F_BillID))
|
||||
return ret, 0, fmt.Errorf("error query database: %v", err)
|
||||
}
|
||||
|
||||
ret[idx].BillPayment = append(ret[idx].BillPayment, paym...)
|
||||
ret[idx].TotalBillPayment = data.F_BillTotal - data.F_BillUnpaid
|
||||
}
|
||||
|
||||
totalPage := int(math.Ceil(float64(totalData) / float64(rowperpage)))
|
||||
return ret, totalPage, nil
|
||||
}
|
||||
@@ -1,21 +1,31 @@
|
||||
package corporate_mcudetail
|
||||
|
||||
// import "cpone/component/customtextfield"
|
||||
// import "cpone/models"
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
templ TabKeuangan(
|
||||
// tableID string,
|
||||
templ TabKeuanganScreen(
|
||||
tableID string,
|
||||
paginationID string,
|
||||
totalcardcomponent templ.Component,
|
||||
tableandpagination templ.Component,
|
||||
) {
|
||||
<div class="container-fluid">
|
||||
// @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
// Name: "tableID",
|
||||
// Type: "hidden",
|
||||
// Value: tableID,
|
||||
// })
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
Name: "tableID",
|
||||
Type: "hidden",
|
||||
Value: tableID,
|
||||
})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID",
|
||||
Name: "paginationID",
|
||||
Type: "hidden",
|
||||
Value: paginationID,
|
||||
})
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0">Keuangan</h2>
|
||||
</div>
|
||||
<div id="loading-parent" class="rounded">
|
||||
@totalcardcomponent
|
||||
@tableandpagination
|
||||
<div id="loading-child" class="rounded bg-transparent">
|
||||
<div id="loading-spinner" class="spinner-border text-primary d-none" style="width: 3rem; height: 3rem;" role="status">
|
||||
<span class="sr-only">Loading....</span>
|
||||
@@ -24,4 +34,46 @@ templ TabKeuangan(
|
||||
</div>
|
||||
<div id="loadingcontent"></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ KeuanganCard(
|
||||
totalOrder string,
|
||||
totalTagihan string,
|
||||
totalPelunasan string,
|
||||
totalHutang string,
|
||||
) {
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="card bg-primary-transparent shadow p-4">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Order</h3>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ totalOrder }</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="card bg-warning-transparent shadow p-4">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Tagihan</h3>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ totalTagihan }</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="card bg-success-transparent shadow p-4">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Pelunasan</h3>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ totalPelunasan }</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="card bg-danger-transparent shadow p-4">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Hutang</h3>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ totalHutang }</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -10,10 +10,14 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
// import "cpone/component/customtextfield"
|
||||
// import "cpone/models"
|
||||
func TabKeuangan(
|
||||
// tableID string,
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
func TabKeuanganScreen(
|
||||
tableID string,
|
||||
paginationID string,
|
||||
totalcardcomponent templ.Component,
|
||||
tableandpagination templ.Component,
|
||||
) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
@@ -27,7 +31,120 @@ func TabKeuangan(
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0\">Keuangan</h2></div><div id=\"loading-parent\" class=\"rounded\"><div id=\"loading-child\" class=\"rounded bg-transparent\"><div id=\"loading-spinner\" class=\"spinner-border text-primary d-none\" style=\"width: 3rem; height: 3rem;\" role=\"status\"><span class=\"sr-only\">Loading....</span></div></div></div><div id=\"loadingcontent\"></div></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
Name: "tableID",
|
||||
Type: "hidden",
|
||||
Value: tableID,
|
||||
}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID",
|
||||
Name: "paginationID",
|
||||
Type: "hidden",
|
||||
Value: paginationID,
|
||||
}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0\">Keuangan</h2></div><div id=\"loading-parent\" class=\"rounded\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = totalcardcomponent.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tableandpagination.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"loading-child\" class=\"rounded bg-transparent\"><div id=\"loading-spinner\" class=\"spinner-border text-primary d-none\" style=\"width: 3rem; height: 3rem;\" role=\"status\"><span class=\"sr-only\">Loading....</span></div></div></div><div id=\"loadingcontent\"></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func KeuanganCard(
|
||||
totalOrder string,
|
||||
totalTagihan string,
|
||||
totalPelunasan string,
|
||||
totalHutang string,
|
||||
) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var2 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var2 == nil {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"row\"><div class=\"col-3\"><div class=\"card bg-primary-transparent shadow p-4\"><div class=\"d-flex flex-column\"><h3>Order</h3><h1 class=\"font-weight-bolder ml-auto mt-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(totalOrder)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkeuangan.templ`, Line: 50, Col: 76}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1></div></div></div><div class=\"col-3\"><div class=\"card bg-warning-transparent shadow p-4\"><div class=\"d-flex flex-column\"><h3>Tagihan</h3><h1 class=\"font-weight-bolder ml-auto mt-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(totalTagihan)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkeuangan.templ`, Line: 58, Col: 78}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1></div></div></div><div class=\"col-3\"><div class=\"card bg-success-transparent shadow p-4\"><div class=\"d-flex flex-column\"><h3>Pelunasan</h3><h1 class=\"font-weight-bolder ml-auto mt-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(totalPelunasan)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkeuangan.templ`, Line: 66, Col: 80}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1></div></div></div><div class=\"col-3\"><div class=\"card bg-danger-transparent shadow p-4\"><div class=\"d-flex flex-column\"><h3>Hutang</h3><h1 class=\"font-weight-bolder ml-auto mt-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(totalHutang)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkeuangan.templ`, Line: 74, Col: 77}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1></div></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -1,20 +1,109 @@
|
||||
package corporate_mcudetail
|
||||
|
||||
// import "cpone/models"
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
templ TableAndPagination(
|
||||
tablecomponent templ.Component,
|
||||
paginationcomp templ.Component,
|
||||
) {
|
||||
<div id="tabdanpagi" hx-on::load={ AfterRequestContent() }>
|
||||
@tablecomponent
|
||||
@paginationcomp
|
||||
</div>
|
||||
}
|
||||
|
||||
templ TableKeuangan(
|
||||
// data []models.KeuanganModel,
|
||||
// tableID string,
|
||||
data []models.KeuanganModel,
|
||||
tableID string,
|
||||
) {
|
||||
<div id="1">
|
||||
<table class="table table-hover table-borderless">
|
||||
<div id={tableID} class="mt-8">
|
||||
<table class="table table-hover table-bordered">
|
||||
<thead>
|
||||
<tr class="rounded-lg bg-header-table">
|
||||
<th colspan="3">Tagihan</th>
|
||||
<th colspan="2">Pelunasan</th>
|
||||
<th rowspan="2">Sisa</th>
|
||||
<th scope="col" class="text-center col-5" colspan="3"><h4>TAGIHAN</h4></th>
|
||||
<th scope="col" class="text-center col-4" colspan="2"><h4>PELUNASAN</h4></th>
|
||||
<th scope="col" class="text-center col-3" rowspan="2" style="vertical-align: middle;"><h4>SISA</h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">No/Tgl</th>
|
||||
<th scope="col" class="text-center">Tgl Jatuh Tempo</th>
|
||||
<th scope="col" class="text-center">Jumlah</th>
|
||||
<th scope="col" class="text-center">No/Tgl</th>
|
||||
<th scope="col" class="text-center">Jumlah</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@RowKeuangan(data)
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
|
||||
// note
|
||||
// row pelunasan -> row tagihan rowspan=len(tab pelunasan)
|
||||
// row sisa ikut ke row pertama tagihan
|
||||
|
||||
templ RowKeuangan(
|
||||
data []models.KeuanganModel,
|
||||
) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">Data Tidak Ditemukan</td>
|
||||
</tr>
|
||||
}
|
||||
for _, v := range data {
|
||||
if len(v.BillPayment) == 0 {
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<div>{ v.F_BillNo }</div>
|
||||
<div>{ v.F_BillCreated }</div>
|
||||
</td>
|
||||
<td class="text-center">{ v.F_BillDueDate }</td>
|
||||
<td class="text-center">{ strconv.FormatFloat(v.F_BillTotal, 'f', 0, 64) }</td>
|
||||
<td class="text-center">-</td>
|
||||
<td class="text-center">-</td>
|
||||
<td class="text-center">{ strconv.FormatFloat(v.F_BillUnpaid, 'f', 0, 64) }</td>
|
||||
</tr>
|
||||
} else if len(v.BillPayment) == 1 {
|
||||
<tr>
|
||||
<td class="text-center" rowspan={ strconv.Itoa(len(v.BillPayment)) }>
|
||||
<div>{ v.F_BillNo }</div>
|
||||
<div>{ v.F_BillCreated }</div>
|
||||
</td>
|
||||
<td class="text-center" rowspan={ strconv.Itoa(len(v.BillPayment)) }>{ v.F_BillDueDate }</td>
|
||||
<td class="text-center" rowspan={ strconv.Itoa(len(v.BillPayment)) }>{ strconv.FormatFloat(v.F_BillTotal, 'f', 0, 64) }</td>
|
||||
<td class="text-center">
|
||||
<div>{ v.BillPayment[0].F_BillPaymentNumber }</div>
|
||||
<div>{ v.BillPayment[0].F_BillPaymentDate }</div>
|
||||
</td>
|
||||
<td class="text-center">{ strconv.FormatFloat(v.BillPayment[0].F_BillPaymentAmount, 'f', 0, 64) }</td>
|
||||
<td class="text-center" rowspan={ strconv.Itoa(len(v.BillPayment)) }>{ strconv.FormatFloat(v.F_BillUnpaid, 'f', 0, 64) }</td>
|
||||
</tr>
|
||||
} else {
|
||||
<tr>
|
||||
<td class="text-center" rowspan={ strconv.Itoa(len(v.BillPayment)) }>
|
||||
<div>{ v.F_BillNo }</div>
|
||||
<div>{ v.F_BillCreated }</div>
|
||||
</td>
|
||||
<td class="text-center" rowspan={ strconv.Itoa(len(v.BillPayment)) }>{ v.F_BillDueDate }</td>
|
||||
<td class="text-center" rowspan={ strconv.Itoa(len(v.BillPayment)) }>{ strconv.FormatFloat(v.F_BillTotal, 'f', 0, 64) }</td>
|
||||
<td class="text-center">
|
||||
<div>{ v.BillPayment[0].F_BillPaymentNumber }</div>
|
||||
<div>{ v.BillPayment[0].F_BillPaymentDate }</div>
|
||||
</td>
|
||||
<td class="text-center">{ strconv.FormatFloat(v.BillPayment[0].F_BillPaymentAmount, 'f', 0, 64) }</td>
|
||||
<td class="text-center" rowspan={ strconv.Itoa(len(v.BillPayment)) }>{ strconv.FormatFloat(v.F_BillUnpaid, 'f', 0, 64) }</td>
|
||||
</tr>
|
||||
for i := 1; i < len(v.BillPayment); i++ {
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<div>{ v.BillPayment[i].F_BillPaymentNumber }</div>
|
||||
<div>{ v.BillPayment[i].F_BillPaymentDate }</div>
|
||||
</td>
|
||||
<td class="text-center">{ strconv.FormatFloat(v.BillPayment[i].F_BillPaymentAmount, 'f', 0, 64) }</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,12 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
// import "cpone/models"
|
||||
func TableKeuangan(
|
||||
// data []models.KeuanganModel,
|
||||
// tableID string,
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
func TableAndPagination(
|
||||
tablecomponent templ.Component,
|
||||
paginationcomp templ.Component,
|
||||
) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
@@ -27,7 +29,32 @@ func TableKeuangan(
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"1\"><table class=\"table table-hover table-borderless\"><thead><tr class=\"rounded-lg bg-header-table\"><th colspan=\"3\">Tagihan</th><th colspan=\"2\">Pelunasan</th><th rowspan=\"2\">Sisa</th></tr></thead></table></div>")
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, AfterRequestContent())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"tabdanpagi\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 templ.ComponentScript = AfterRequestContent()
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecomponent.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = paginationcomp.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -37,3 +64,522 @@ func TableKeuangan(
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func TableKeuangan(
|
||||
data []models.KeuanganModel,
|
||||
tableID string,
|
||||
) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var3 == nil {
|
||||
templ_7745c5c3_Var3 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(tableID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 20, Col: 20}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"mt-8\"><table class=\"table table-hover table-bordered\"><thead><tr class=\"rounded-lg bg-header-table\"><th scope=\"col\" class=\"text-center col-5\" colspan=\"3\"><h4>TAGIHAN</h4></th><th scope=\"col\" class=\"text-center col-4\" colspan=\"2\"><h4>PELUNASAN</h4></th><th scope=\"col\" class=\"text-center col-3\" rowspan=\"2\" style=\"vertical-align: middle;\"><h4>SISA</h4></th></tr><tr><th scope=\"col\" class=\"text-center\">No/Tgl</th><th scope=\"col\" class=\"text-center\">Tgl Jatuh Tempo</th><th scope=\"col\" class=\"text-center\">Jumlah</th><th scope=\"col\" class=\"text-center\">No/Tgl</th><th scope=\"col\" class=\"text-center\">Jumlah</th></tr></thead> <tbody>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = RowKeuangan(data).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</tbody></table></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
// note
|
||||
// row pelunasan -> row tagihan rowspan=len(tab pelunasan)
|
||||
// row sisa ikut ke row pertama tagihan
|
||||
func RowKeuangan(
|
||||
data []models.KeuanganModel,
|
||||
) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var5 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var5 == nil {
|
||||
templ_7745c5c3_Var5 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if len(data) == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td colspan=\"6\" class=\"text-center\">Data Tidak Ditemukan</td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
for _, v := range data {
|
||||
if len(v.BillPayment) == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td class=\"text-center\"><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillNo)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 59, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillCreated)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 60, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></td><td class=\"text-center\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillDueDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 62, Col: 57}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td><td class=\"text-center\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.F_BillTotal, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 63, Col: 88}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td><td class=\"text-center\">-</td><td class=\"text-center\">-</td><td class=\"text-center\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.F_BillUnpaid, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 66, Col: 89}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else if len(v.BillPayment) == 1 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td class=\"text-center\" rowspan=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 70, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillNo)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 71, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillCreated)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 72, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></td><td class=\"text-center\" rowspan=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 74, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillDueDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 74, Col: 102}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td><td class=\"text-center\" rowspan=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 75, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.F_BillTotal, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 75, Col: 133}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td><td class=\"text-center\"><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[0].F_BillPaymentNumber)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 77, Col: 63}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[0].F_BillPaymentDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 78, Col: 61}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></td><td class=\"text-center\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.BillPayment[0].F_BillPaymentAmount, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 80, Col: 111}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td><td class=\"text-center\" rowspan=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var21 string
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 81, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var22 string
|
||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.F_BillUnpaid, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 81, Col: 134}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td class=\"text-center\" rowspan=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 85, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var24 string
|
||||
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillNo)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 86, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var25 string
|
||||
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillCreated)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 87, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></td><td class=\"text-center\" rowspan=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 89, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var27 string
|
||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillDueDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 89, Col: 102}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td><td class=\"text-center\" rowspan=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var28 string
|
||||
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 90, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var29 string
|
||||
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.F_BillTotal, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 90, Col: 133}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td><td class=\"text-center\"><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var30 string
|
||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[0].F_BillPaymentNumber)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 92, Col: 63}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var31 string
|
||||
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[0].F_BillPaymentDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 93, Col: 61}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></td><td class=\"text-center\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var32 string
|
||||
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.BillPayment[0].F_BillPaymentAmount, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 95, Col: 111}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td><td class=\"text-center\" rowspan=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var33 string
|
||||
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 96, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var34 string
|
||||
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.F_BillUnpaid, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 96, Col: 134}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for i := 1; i < len(v.BillPayment); i++ {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td class=\"text-center\"><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var35 string
|
||||
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[i].F_BillPaymentNumber)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 101, Col: 67}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var36 string
|
||||
templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[i].F_BillPaymentDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 102, Col: 65}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></td><td class=\"text-center\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var37 string
|
||||
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatFloat(v.BillPayment[i].F_BillPaymentAmount, 'f', 0, 64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 104, Col: 115}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ templ TabViewMcuDetail(
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_8">Executive Summary</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_9">Keuangan</a>
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_9" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkeuangan"} hx-target="#tabkeuangan">Keuangan</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -63,7 +63,6 @@ templ TabViewMcuDetail(
|
||||
</div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_9" role="tabpanel" aria-labelledby="kt_tab_pane_9">
|
||||
<div id="tabkeuangan">
|
||||
Soon....
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,16 +51,29 @@ func TabViewMcuDetail(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"#tabdaftarpeserta\">Daftar Peserta</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_8\">Executive Summary</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_9\">Keuangan</a></li></ul></div><div class=\"tab-content mt-5\" id=\"myTabContent\"><div class=\"tab-pane fade show active\" id=\"kt_tab_pane_1\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_2\" style=\"height: 800px;\"><object data=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"#tabdaftarpeserta\">Daftar Peserta</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_8\">Executive Summary</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_9\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_001.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabkeuangan")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 33, Col: 122}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"#tabkeuangan\">Keuangan</a></li></ul></div><div class=\"tab-content mt-5\" id=\"myTabContent\"><div class=\"tab-pane fade show active\" id=\"kt_tab_pane_1\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_2\" style=\"height: 800px;\"><object data=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_001.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 39, Col: 167}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -68,12 +81,12 @@ func TabViewMcuDetail(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_002.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_002.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 42, Col: 167}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -81,12 +94,12 @@ func TabViewMcuDetail(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_003.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_003.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 45, Col: 167}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -94,12 +107,12 @@ func TabViewMcuDetail(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_004.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_004.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 48, Col: 167}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -107,12 +120,12 @@ func TabViewMcuDetail(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_005.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_005.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 51, Col: 167}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -120,16 +133,16 @@ func TabViewMcuDetail(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_summary_executive.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_summary_executive.rptdesign&__format=pdf&PID=" + id + "&username=adhi&tm=1717726294764")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 62, Col: 171}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"application/pdf\" width=\"100%\" height=\"100%\"></object></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_9\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_9\"><div id=\"tabkeuangan\">Soon....\r</div></div></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"application/pdf\" width=\"100%\" height=\"100%\"></object></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_9\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_9\"><div id=\"tabkeuangan\"></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user