fix: update year formatting for payment dates in pcpd view

1 parent 2b95a1a4
......@@ -353,7 +353,7 @@ class Views(BaseView):
today.strftime("%Y-%m-%d"), filter_exp)
# Total Tahunan
field = func.to_char(PaymentBPHTB.tgl, 'IYYY')
field = func.to_char(PaymentBPHTB.tgl, 'YYYY')
filter_exp = PaymentBPHTB.tgl.between(
datetime.strptime(f"{today.year}-01-01", "%Y-%m-%d"), today)
ytd, ytdTrx, yearly, yearlyTrx, yearlyAcc, yearlyAccTrx = \
......@@ -412,7 +412,7 @@ class Views(BaseView):
today.strftime("%Y-%m-%d"), filter_exp, typ)
# Total Tahun Berjalan
field = func.to_char(PaymentPAD.tgl, 'IYYY')
field = func.to_char(PaymentPAD.tgl, 'YYYY')
filter_exp = PaymentPAD.tgl.between(
datetime.strptime(f"{today.year}-01-01", "%Y-%m-%d"), today)
ytd, ytdTrx, yearly, yearlyTrx, yearlyAcc, yearlyAccTrx = \
......@@ -472,7 +472,7 @@ class Views(BaseView):
today.strftime("%Y-%m-%d"), filter_exp)
# Tahunan
field = func.to_char(PaymentWEBR.tgl, 'IYYY')
field = func.to_char(PaymentWEBR.tgl, 'YYYY')
filter_exp = PaymentWEBR.tgl.between(
datetime.strptime(f"{today.year}-01-01", "%Y-%m-%d"), today)
ytd, ytdTrx, yearly, yearlyTrx, yearlyAcc, yearlyAccTrx = \
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!