jonathanjordan21 commited on
Commit
4c2316d
·
verified ·
1 Parent(s): 3af8ead

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -23
app.py CHANGED
@@ -784,32 +784,32 @@ async def get_data_json(body: InputData):
784
  string += "\n---\n*DATA KENDARAAN:*\n"
785
  string += "\n".join([f"{k.replace('_', ' ')} \t\t\t: {v}" for k,v in data_kendaraan.items()])
786
  string += "\n---"
 
 
 
 
787
 
788
  string += "\n*RINCIAN:*\n"
789
 
790
- if not total_tagihan:
791
- string += "Status Pajak Kendaraan belum memasuki masa pembayaran."
792
- else:
793
-
794
- string += "".join([f"{x['jenis']}:\nPokok: Rp{x['pokok']}\nDenda: Rp{x['denda']}\nTotal: Rp{x['total']}\n---" for x in total_tagihan])
795
-
796
- string += "\n*Rincian PKB:*\n"
797
- string+= "\n".join(
798
- [
799
- f"Pokok: Rp{x['pokok']}\nDenda: Rp{x['denda']}\nTotal: Rp{x['total']}\n---"
800
- for x in rincians_pkb
801
- if str(x.get("total", 0)) != "0"
802
- ]
803
- )
804
-
805
- string += "\n*Rincian SWDKLLJ:*\n"
806
- string += "\n".join(
807
- [
808
- f"Pokok: Rp{x['pokok']}\nDenda: Rp{x['denda']}\nTotal: Rp{x['total']}\n---"
809
- for x in rincians_swd
810
- if str(x.get("total", 0)) != "0"
811
- ]
812
- )
813
 
814
  string += "\n\n"
815
 
 
784
  string += "\n---\n*DATA KENDARAAN:*\n"
785
  string += "\n".join([f"{k.replace('_', ' ')} \t\t\t: {v}" for k,v in data_kendaraan.items()])
786
  string += "\n---"
787
+
788
+ if not total_tagihan:
789
+ string += "\n------\nStatus Pajak Kendaraan belum memasuki masa pembayaran.\n------\n\n"
790
+ continue
791
 
792
  string += "\n*RINCIAN:*\n"
793
 
794
+ string += "".join([f"{x['jenis']}:\nPokok: Rp{x['pokok']}\nDenda: Rp{x['denda']}\nTotal: Rp{x['total']}\n---" for x in total_tagihan])
795
+
796
+ string += "\n*Rincian PKB:*\n"
797
+ string+= "\n".join(
798
+ [
799
+ f"Pokok: Rp{x['pokok']}\nDenda: Rp{x['denda']}\nTotal: Rp{x['total']}\n---"
800
+ for x in rincians_pkb
801
+ if str(x.get("total", 0)) != "0"
802
+ ]
803
+ )
804
+
805
+ string += "\n*Rincian SWDKLLJ:*\n"
806
+ string += "\n".join(
807
+ [
808
+ f"Pokok: Rp{x['pokok']}\nDenda: Rp{x['denda']}\nTotal: Rp{x['total']}\n---"
809
+ for x in rincians_swd
810
+ if str(x.get("total", 0)) != "0"
811
+ ]
812
+ )
 
 
 
 
813
 
814
  string += "\n\n"
815