Watch
1
0
Fork
You've already forked Seyyed_arc
0
forked from hesabix/arc
Seyyed_arc/docs/hscript/recipes/debtors-top.md
2026-07-26 16:46:22 +00:00

749 B

doc_id title tags version example_id
hscript.recipe.debtors-top بدهکاران برتر
recipe
example
debtors
1 ex_debtors_top

دستورپخت: بدهکاران برتر

# @param limit integer "تعداد" default=10
report.calendar("jalali")
report.number_format(style="western")
report.title("بدهکاران برتر")
n = params.get("limit", 10)
rows = debtors.top(n)
report.kpi("تعداد", rows.count(), format="integer", span=6)
report.kpi("جمع بدهی", rows.sum("debt"), format="currency", span=6)
report.row_break()
report.bar_chart(rows, x="name", y="debt", title="بیشترین بدهی", span=12)
report.table(rows, columns=["code", "name", "debt"], formats={"debt": "currency"}, span=12)