We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71f718f commit 8afe17fCopy full SHA for 8afe17f
1 file changed
index.html
@@ -986,12 +986,15 @@ <h4>Pending UPI payments <span id="pendingCount" class="pending-badge">0</span><
986
return count;
987
},
988
async getAllPeriods(){
989
- const ledSnap=await fs.getDocs(fs.collectionGroup(db,"ledger"));
+ const cSnap=await fs.getDocs(fs.collection(db,"citizens"));
990
const periods=new Set();
991
- ledSnap.docs.forEach(d=>{
992
- const e=d.data();
993
- if(e.type==="charge" && e.note) periods.add(e.note);
994
- });
+ for(const d of cSnap.docs){
+ const ledSnap=await fs.getDocs(fs.collection(db,"citizens",d.id,"ledger"));
+ ledSnap.docs.forEach(ld=>{
+ const e=ld.data();
995
+ if(e.type==="charge" && e.note) periods.add(e.note);
996
+ });
997
+ }
998
return Array.from(periods).sort();
999
1000
async getExcludedPeriods(){
0 commit comments